Skip to content

Commit 7fbcf8c

Browse files
committed
feat: add @omniviewdev/base-ui, ai-ui, editors as shared plugin dependencies
Add the published npm packages to the shared dependencies registry and vite plugin externals so plugins can consume them without bundling.
1 parent 349eeba commit 7fbcf8c

30 files changed

Lines changed: 512 additions & 354 deletions

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
"@mui/material": "^7.3.0",
3030
"@mui/x-charts": "^8.27.0",
3131
"@mui/x-date-pickers": "^8.27.0",
32+
"@omniviewdev/ai-ui": "^0.1.0",
33+
"@omniviewdev/base-ui": "^0.1.0",
34+
"@omniviewdev/editors": "^0.1.0",
3235
"@omniviewdev/providers": "workspace:*",
3336
"@omniviewdev/runtime": "workspace:*",
3437
"@omniviewdev/ui": "workspace:*",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Auto-generated shim for '@omniviewdev/ai-ui'
2+
// DO NOT EDIT -- regenerate with: pnpm --filter @omniviewdev/vite-plugin generate-shims
3+
4+
const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/ai-ui'];
5+
6+
if (!mod) {
7+
throw new Error(
8+
'[omniview] Shared dependency "@omniviewdev/ai-ui" is not available on window.__OMNIVIEW_SHARED__. ' +
9+
'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
10+
);
11+
}
12+
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
14+
export default mod.default !== undefined ? mod.default : mod;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Auto-generated shim for '@omniviewdev/ai-ui/styles.css'
2+
// DO NOT EDIT -- regenerate with: pnpm --filter @omniviewdev/vite-plugin generate-shims
3+
4+
const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/ai-ui/styles.css'];
5+
6+
if (!mod) {
7+
throw new Error(
8+
'[omniview] Shared dependency "@omniviewdev/ai-ui/styles.css" is not available on window.__OMNIVIEW_SHARED__. ' +
9+
'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
10+
);
11+
}
12+
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
14+
export default mod.default !== undefined ? mod.default : mod;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Auto-generated shim for '@omniviewdev/base-ui'
2+
// DO NOT EDIT -- regenerate with: pnpm --filter @omniviewdev/vite-plugin generate-shims
3+
4+
const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/base-ui'];
5+
6+
if (!mod) {
7+
throw new Error(
8+
'[omniview] Shared dependency "@omniviewdev/base-ui" is not available on window.__OMNIVIEW_SHARED__. ' +
9+
'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
10+
);
11+
}
12+
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
14+
export default mod.default !== undefined ? mod.default : mod;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Auto-generated shim for '@omniviewdev/base-ui/styles.css'
2+
// DO NOT EDIT -- regenerate with: pnpm --filter @omniviewdev/vite-plugin generate-shims
3+
4+
const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/base-ui/styles.css'];
5+
6+
if (!mod) {
7+
throw new Error(
8+
'[omniview] Shared dependency "@omniviewdev/base-ui/styles.css" is not available on window.__OMNIVIEW_SHARED__. ' +
9+
'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
10+
);
11+
}
12+
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
14+
export default mod.default !== undefined ? mod.default : mod;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Auto-generated shim for '@omniviewdev/editors'
2+
// DO NOT EDIT -- regenerate with: pnpm --filter @omniviewdev/vite-plugin generate-shims
3+
4+
const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/editors'];
5+
6+
if (!mod) {
7+
throw new Error(
8+
'[omniview] Shared dependency "@omniviewdev/editors" is not available on window.__OMNIVIEW_SHARED__. ' +
9+
'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
10+
);
11+
}
12+
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
14+
export default mod.default !== undefined ? mod.default : mod;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Auto-generated shim for '@omniviewdev/editors/styles.css'
2+
// DO NOT EDIT -- regenerate with: pnpm --filter @omniviewdev/vite-plugin generate-shims
3+
4+
const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/editors/styles.css'];
5+
6+
if (!mod) {
7+
throw new Error(
8+
'[omniview] Shared dependency "@omniviewdev/editors/styles.css" is not available on window.__OMNIVIEW_SHARED__. ' +
9+
'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
10+
);
11+
}
12+
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
14+
export default mod.default !== undefined ? mod.default : mod;

packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,73 +10,5 @@ if (!mod) {
1010
);
1111
}
1212

13-
export const ALL_SESSIONS_KEY = mod.ALL_SESSIONS_KEY;
14-
export const BottomDrawerContext = mod.BottomDrawerContext;
15-
export const ConfirmationModalContext = mod.ConfirmationModalContext;
16-
export const ErrorTypes = mod.ErrorTypes;
17-
export const ExtensionPointRegistry = mod.ExtensionPointRegistry;
18-
export const ExtensionPointStore = mod.ExtensionPointStore;
19-
export const ExtensionProvider = mod.ExtensionProvider;
20-
export const WatchState = mod.WatchState;
21-
export const SyncPolicy = mod.SyncPolicy;
22-
export const Link = mod.Link;
23-
export const OperationsContext = mod.OperationsContext;
24-
export const OperationsProvider = mod.OperationsProvider;
25-
export const PluginContext = mod.PluginContext;
26-
export const PluginContextProvider = mod.PluginContextProvider;
27-
export const PluginErrorCode = mod.PluginErrorCode;
28-
export const PluginWindow = mod.PluginWindow;
29-
export const PluginWindowRootProps = mod.PluginWindowRootProps;
30-
export const RightDrawerContext = mod.RightDrawerContext;
31-
export const SettingsContext = mod.SettingsContext;
32-
export const SettingsProvider = mod.SettingsProvider;
33-
export const SnackbarProvider = mod.SnackbarProvider;
34-
export const actionToSnackbar = mod.actionToSnackbar;
35-
export const connectionListQueryKey = mod.connectionListQueryKey;
36-
export const createErrorHandler = mod.createErrorHandler;
37-
export const defaultState = mod.defaultState;
38-
export const isCancelledError = mod.isCancelledError;
39-
export const parseAppError = mod.parseAppError;
40-
export const showAppError = mod.showAppError;
41-
export const useActiveSyncs = mod.useActiveSyncs;
42-
export const useBottomDrawer = mod.useBottomDrawer;
43-
export const useConfirmationModal = mod.useConfirmationModal;
44-
export const useConnection = mod.useConnection;
45-
export const useConnectionNamespaces = mod.useConnectionNamespaces;
46-
export const useConnectionStatus = mod.useConnectionStatus;
47-
export const useConnections = mod.useConnections;
48-
export const useEditorSchemas = mod.useEditorSchemas;
49-
export const useExec = mod.useExec;
50-
export const useExecuteAction = mod.useExecuteAction;
51-
export const useExtensionPoint = mod.useExtensionPoint;
52-
export const useExtensionPointComponents = mod.useExtensionPointComponents;
53-
export const useExtensionRegistry = mod.useExtensionRegistry;
54-
export const useWatchState = mod.useWatchState;
55-
export const useLogs = mod.useLogs;
56-
export const useMetricProviders = mod.useMetricProviders;
57-
export const useMetricProvidersForResource = mod.useMetricProvidersForResource;
58-
export const useMetricStream = mod.useMetricStream;
59-
export const useOperations = mod.useOperations;
60-
export const usePluginContext = mod.usePluginContext;
61-
export const usePluginData = mod.usePluginData;
62-
export const usePluginRouter = mod.usePluginRouter;
63-
export const usePluginSettings = mod.usePluginSettings;
64-
export const usePortForwardSessions = mod.usePortForwardSessions;
65-
export const useResolvedPluginId = mod.useResolvedPluginId;
66-
export const useResource = mod.useResource;
67-
export const useResourceActions = mod.useResourceActions;
68-
export const useResourceAreaComponent = mod.useResourceAreaComponent;
69-
export const useResourceGroups = mod.useResourceGroups;
70-
export const useResourceMetrics = mod.useResourceMetrics;
71-
export const useResourceMutations = mod.useResourceMutations;
72-
export const useResourcePortForwarder = mod.useResourcePortForwarder;
73-
export const useResourceSearch = mod.useResourceSearch;
74-
export const useResourceType = mod.useResourceType;
75-
export const useResourceTypes = mod.useResourceTypes;
76-
export const useResources = mod.useResources;
77-
export const useRightDrawer = mod.useRightDrawer;
78-
export const useSettings = mod.useSettings;
79-
export const useSnackbar = mod.useSnackbar;
80-
export const useStreamAction = mod.useStreamAction;
81-
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
8214
export default mod.default !== undefined ? mod.default : mod;

packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__api.mjs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,5 @@ if (!mod) {
1010
);
1111
}
1212

13-
export const DevServerManager = mod.DevServerManager;
14-
export const DiagnosticsClient = mod.DiagnosticsClient;
15-
export const ExecClient = mod.ExecClient;
16-
export const GetOperatingSystem = mod.GetOperatingSystem;
17-
export const LogsClient = mod.LogsClient;
18-
export const MetricClient = mod.MetricClient;
19-
export const NetworkerClient = mod.NetworkerClient;
20-
export const OpenFileSelectionDialog = mod.OpenFileSelectionDialog;
21-
export const PluginManager = mod.PluginManager;
22-
export const ResourceClient = mod.ResourceClient;
23-
export const SaveFileDialog = mod.SaveFileDialog;
24-
export const SettingsClient = mod.SettingsClient;
25-
export const SettingsProvider = mod.SettingsProvider;
26-
export const UIClient = mod.UIClient;
27-
export const UtilsClient = mod.UtilsClient;
28-
export const WriteFileContent = mod.WriteFileContent;
29-
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
3014
export default mod.default !== undefined ? mod.default : mod;

packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,5 @@ if (!mod) {
1010
);
1111
}
1212

13-
export const config = mod.config;
14-
export const devserver = mod.devserver;
15-
export const exec = mod.exec;
16-
export const logs = mod.logs;
17-
export const main = mod.main;
18-
export const metric = mod.metric;
19-
export const networker = mod.networker;
20-
export const plugin = mod.plugin;
21-
export const registry = mod.registry;
22-
export const settings = mod.settings;
23-
export const time = mod.time;
24-
export const types = mod.types;
25-
export const ui = mod.ui;
26-
export const utils = mod.utils;
27-
13+
// Default export: prefer mod.default, fall back to the module namespace itself.
2814
export default mod.default !== undefined ? mod.default : mod;

0 commit comments

Comments
 (0)