@kosdev-code/kos-ui-plugin 2.0.41 → 2.1.0
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/documentation-generator-B8FuhDjB.js +1271 -0
- package/documentation-generator-B8FuhDjB.js.map +1 -0
- package/documentation-generator-E9tFyId_.cjs +266 -0
- package/documentation-generator-E9tFyId_.cjs.map +1 -0
- package/index.cjs +412 -4
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +2179 -64
- package/index.js.map +1 -1
- package/lib/components/dynamic-component/dynamic-component.d.ts.map +1 -1
- package/lib/components/dynamic-component/error-boundary.d.ts +17 -0
- package/lib/components/dynamic-component/error-boundary.d.ts.map +1 -0
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/plugin-explorer/extension-point-list.d.ts +13 -0
- package/lib/components/plugin-explorer/extension-point-list.d.ts.map +1 -0
- package/lib/components/plugin-explorer/floating-plugin-explorer.d.ts +13 -0
- package/lib/components/plugin-explorer/floating-plugin-explorer.d.ts.map +1 -0
- package/lib/components/plugin-explorer/index.d.ts +10 -0
- package/lib/components/plugin-explorer/index.d.ts.map +1 -0
- package/lib/components/plugin-explorer/plugin-card.d.ts +10 -0
- package/lib/components/plugin-explorer/plugin-card.d.ts.map +1 -0
- package/lib/components/plugin-explorer/plugin-explorer.d.ts +12 -0
- package/lib/components/plugin-explorer/plugin-explorer.d.ts.map +1 -0
- package/lib/components/plugin-explorer/plugin-health-dashboard.d.ts +9 -0
- package/lib/components/plugin-explorer/plugin-health-dashboard.d.ts.map +1 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/use-extension-component.d.ts +21 -0
- package/lib/hooks/use-extension-component.d.ts.map +1 -0
- package/lib/hooks/use-plugin-discovery.d.ts +23 -0
- package/lib/hooks/use-plugin-discovery.d.ts.map +1 -0
- package/lib/hooks/use-typed-extensions.d.ts +152 -0
- package/lib/hooks/use-typed-extensions.d.ts.map +1 -0
- package/lib/utils/discovery/documentation-generator.d.ts +85 -0
- package/lib/utils/discovery/documentation-generator.d.ts.map +1 -0
- package/lib/utils/discovery/plugin-discovery-service.d.ts +109 -0
- package/lib/utils/discovery/plugin-discovery-service.d.ts.map +1 -0
- package/lib/utils/extension-points/define-extension-point.d.ts +58 -0
- package/lib/utils/extension-points/define-extension-point.d.ts.map +1 -0
- package/lib/utils/extension-points/example-extension-point.d.ts +67 -0
- package/lib/utils/extension-points/example-extension-point.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-registry.d.ts +34 -0
- package/lib/utils/extension-points/extension-point-registry.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-schema.d.ts +9 -0
- package/lib/utils/extension-points/extension-point-schema.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-schemas.d.ts +92 -0
- package/lib/utils/extension-points/extension-point-schemas.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-transforms.d.ts +21 -0
- package/lib/utils/extension-points/extension-point-transforms.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-types.d.ts +162 -0
- package/lib/utils/extension-points/extension-point-types.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-validation.d.ts +43 -0
- package/lib/utils/extension-points/extension-point-validation.d.ts.map +1 -0
- package/lib/utils/index.d.ts +9 -15
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/{plugin-extension-manager.d.ts → plugin-system/plugin-extension-manager.d.ts} +3 -5
- package/lib/utils/plugin-system/plugin-extension-manager.d.ts.map +1 -0
- package/lib/utils/plugin-system/plugin-extension-registry-init.d.ts +2 -0
- package/lib/utils/plugin-system/plugin-extension-registry-init.d.ts.map +1 -0
- package/lib/utils/{plugin-extension-registry.d.ts → plugin-system/plugin-extension-registry.d.ts} +1 -1
- package/lib/utils/plugin-system/plugin-extension-registry.d.ts.map +1 -0
- package/lib/utils/{plugin-reducer.d.ts → plugin-system/plugin-reducer.d.ts} +1 -1
- package/lib/utils/plugin-system/plugin-reducer.d.ts.map +1 -0
- package/lib/utils/{resolve-best-extension.d.ts → plugin-system/resolve-best-extension.d.ts} +1 -1
- package/lib/utils/plugin-system/resolve-best-extension.d.ts.map +1 -0
- package/lib/utils/processors/contribution-reducer.d.ts +5 -0
- package/lib/utils/processors/contribution-reducer.d.ts.map +1 -0
- package/lib/utils/{initialize-plugins.d.ts → processors/initialize-plugins.d.ts} +2 -2
- package/lib/utils/processors/initialize-plugins.d.ts.map +1 -0
- package/lib/utils/processors/initialize-simplified-extensions.d.ts +13 -0
- package/lib/utils/processors/initialize-simplified-extensions.d.ts.map +1 -0
- package/lib/utils/{process-kos-config.d.ts → processors/process-kos-config.d.ts} +1 -1
- package/lib/utils/processors/process-kos-config.d.ts.map +1 -0
- package/lib/utils/processors/simplified-contribution-processor.d.ts +14 -0
- package/lib/utils/processors/simplified-contribution-processor.d.ts.map +1 -0
- package/package.json +2 -7
- package/types/global.d.ts +0 -62
- package/types/plugins.d.ts +3 -127
- package/utils.cjs +1 -1
- package/utils.cjs.map +1 -1
- package/utils.js +99 -82
- package/utils.js.map +1 -1
- package/dev.cjs +0 -57
- package/dev.cjs.map +0 -1
- package/dev.js +0 -403
- package/dev.js.map +0 -1
- package/emotion-react-jsx-runtime.browser.esm-0ViwU5Kh.cjs +0 -17
- package/emotion-react-jsx-runtime.browser.esm-0ViwU5Kh.cjs.map +0 -1
- package/emotion-react-jsx-runtime.browser.esm-70CdOW1e.js +0 -1065
- package/emotion-react-jsx-runtime.browser.esm-70CdOW1e.js.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-component-view.d.ts +0 -9
- package/lib/dev/components/dynamic-view/dynamic-component-view.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-container.d.ts +0 -8
- package/lib/dev/components/dynamic-view/dynamic-container.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-view-basic.d.ts +0 -13
- package/lib/dev/components/dynamic-view/dynamic-view-basic.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-view-modal.d.ts +0 -15
- package/lib/dev/components/dynamic-view/dynamic-view-modal.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-view-picker.d.ts +0 -9
- package/lib/dev/components/dynamic-view/dynamic-view-picker.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-view-settings.d.ts +0 -15
- package/lib/dev/components/dynamic-view/dynamic-view-settings.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/dynamic-view-utilities.d.ts +0 -15
- package/lib/dev/components/dynamic-view/dynamic-view-utilities.d.ts.map +0 -1
- package/lib/dev/components/dynamic-view/index.d.ts +0 -8
- package/lib/dev/components/dynamic-view/index.d.ts.map +0 -1
- package/lib/dev/components/index.d.ts +0 -4
- package/lib/dev/components/index.d.ts.map +0 -1
- package/lib/dev/components/shell/header/header.d.ts +0 -2
- package/lib/dev/components/shell/header/header.d.ts.map +0 -1
- package/lib/dev/components/shell/header/index.d.ts +0 -2
- package/lib/dev/components/shell/header/index.d.ts.map +0 -1
- package/lib/dev/components/shell/index.d.ts +0 -3
- package/lib/dev/components/shell/index.d.ts.map +0 -1
- package/lib/dev/components/shell/shell.d.ts +0 -10
- package/lib/dev/components/shell/shell.d.ts.map +0 -1
- package/lib/dev/components/storybook/control-pour-story-container/control-pour-story-container.d.ts +0 -8
- package/lib/dev/components/storybook/control-pour-story-container/control-pour-story-container.d.ts.map +0 -1
- package/lib/dev/components/storybook/control-pour-story-container/index.d.ts +0 -2
- package/lib/dev/components/storybook/control-pour-story-container/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/cui-story-container/cui-story-container.d.ts +0 -8
- package/lib/dev/components/storybook/cui-story-container/cui-story-container.d.ts.map +0 -1
- package/lib/dev/components/storybook/cui-story-container/index.d.ts +0 -2
- package/lib/dev/components/storybook/cui-story-container/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/index.d.ts +0 -7
- package/lib/dev/components/storybook/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/nav-story-container/index.d.ts +0 -2
- package/lib/dev/components/storybook/nav-story-container/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/nav-story-container/nav-story-container.d.ts +0 -8
- package/lib/dev/components/storybook/nav-story-container/nav-story-container.d.ts.map +0 -1
- package/lib/dev/components/storybook/setting-story-container/index.d.ts +0 -2
- package/lib/dev/components/storybook/setting-story-container/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/setting-story-container/setting-story-container.d.ts +0 -8
- package/lib/dev/components/storybook/setting-story-container/setting-story-container.d.ts.map +0 -1
- package/lib/dev/components/storybook/setup-step-story-container/index.d.ts +0 -2
- package/lib/dev/components/storybook/setup-step-story-container/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/setup-step-story-container/setup-step-story-container.d.ts +0 -8
- package/lib/dev/components/storybook/setup-step-story-container/setup-step-story-container.d.ts.map +0 -1
- package/lib/dev/components/storybook/utility-story-container/index.d.ts +0 -2
- package/lib/dev/components/storybook/utility-story-container/index.d.ts.map +0 -1
- package/lib/dev/components/storybook/utility-story-container/utility-story-container.d.ts +0 -8
- package/lib/dev/components/storybook/utility-story-container/utility-story-container.d.ts.map +0 -1
- package/lib/dev/index.d.ts +0 -3
- package/lib/dev/index.d.ts.map +0 -1
- package/lib/dev/utils/index.d.ts +0 -2
- package/lib/dev/utils/index.d.ts.map +0 -1
- package/lib/dev/utils/kos-metadata-parser.d.ts +0 -6
- package/lib/dev/utils/kos-metadata-parser.d.ts.map +0 -1
- package/lib/dev/utils/normalize.d.ts +0 -2
- package/lib/dev/utils/normalize.d.ts.map +0 -1
- package/lib/utils/contribution-reducer.d.ts +0 -5
- package/lib/utils/contribution-reducer.d.ts.map +0 -1
- package/lib/utils/control-pour-reducer.d.ts +0 -5
- package/lib/utils/control-pour-reducer.d.ts.map +0 -1
- package/lib/utils/cui-reducer.d.ts +0 -7
- package/lib/utils/cui-reducer.d.ts.map +0 -1
- package/lib/utils/dashboard-detail-reducer.d.ts +0 -5
- package/lib/utils/dashboard-detail-reducer.d.ts.map +0 -1
- package/lib/utils/dashboard-pump-detail-reducer.d.ts +0 -5
- package/lib/utils/dashboard-pump-detail-reducer.d.ts.map +0 -1
- package/lib/utils/dashboard-reducer.d.ts +0 -3
- package/lib/utils/dashboard-reducer.d.ts.map +0 -1
- package/lib/utils/dashboard-summary-reducer.d.ts +0 -5
- package/lib/utils/dashboard-summary-reducer.d.ts.map +0 -1
- package/lib/utils/initialize-plugins.d.ts.map +0 -1
- package/lib/utils/nav-view-reducer.d.ts +0 -5
- package/lib/utils/nav-view-reducer.d.ts.map +0 -1
- package/lib/utils/plugin-extension-manager.d.ts.map +0 -1
- package/lib/utils/plugin-extension-registry-init.d.ts +0 -2
- package/lib/utils/plugin-extension-registry-init.d.ts.map +0 -1
- package/lib/utils/plugin-extension-registry.d.ts.map +0 -1
- package/lib/utils/plugin-reducer.d.ts.map +0 -1
- package/lib/utils/process-kos-config.d.ts.map +0 -1
- package/lib/utils/resolve-best-extension.d.ts.map +0 -1
- package/lib/utils/settings-reducer.d.ts +0 -8
- package/lib/utils/settings-reducer.d.ts.map +0 -1
- package/lib/utils/setup-reducer.d.ts +0 -7
- package/lib/utils/setup-reducer.d.ts.map +0 -1
- package/lib/utils/state-action-reducer.d.ts +0 -5
- package/lib/utils/state-action-reducer.d.ts.map +0 -1
- package/lib/utils/util-reducer.d.ts +0 -7
- package/lib/utils/util-reducer.d.ts.map +0 -1
- package/resolve-best-extension-CqHaJSdN.js +0 -590
- package/resolve-best-extension-CqHaJSdN.js.map +0 -1
- package/resolve-best-extension-DSdPcuL3.cjs +0 -2
- package/resolve-best-extension-DSdPcuL3.cjs.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example: Creating a new extension point using the simplified API
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to create an extension point with the new
|
|
5
|
+
* defineExtensionPoint API. This is just for reference and testing.
|
|
6
|
+
*/
|
|
7
|
+
export declare const AnalyticsWidgetExtension: import('./extension-point-types').ExtensionPointDefinition<any, any, any>;
|
|
8
|
+
export declare const CustomReportExtension: import('./extension-point-types').ViewExtensionPointDefinition<any, any, any>;
|
|
9
|
+
interface NotificationConfig {
|
|
10
|
+
id: string;
|
|
11
|
+
type: "info" | "warning" | "error" | "success";
|
|
12
|
+
title: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
duration?: number;
|
|
15
|
+
actions?: Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
action: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
interface ProcessedNotificationConfig extends NotificationConfig {
|
|
21
|
+
_meta: {
|
|
22
|
+
registeredAt: number;
|
|
23
|
+
source: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare const NotificationExtension: import('./extension-point-types').ExtensionPointDefinition<NotificationConfig, ProcessedNotificationConfig, any>;
|
|
27
|
+
export {};
|
|
28
|
+
/**
|
|
29
|
+
* How to use these extension points in a component:
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import { DynamicComponent } from '@kosdev-code/kos-ui-plugin';
|
|
33
|
+
* import { AnalyticsWidgetExtension } from './example-extension-point';
|
|
34
|
+
*
|
|
35
|
+
* function MyDashboard() {
|
|
36
|
+
* return (
|
|
37
|
+
* <div>
|
|
38
|
+
* <DynamicComponent
|
|
39
|
+
* extension={AnalyticsWidgetExtension.id}
|
|
40
|
+
* props={{ dashboardId: 'main' }}
|
|
41
|
+
* fallback={<div>Loading analytics...</div>}
|
|
42
|
+
* />
|
|
43
|
+
* </div>
|
|
44
|
+
* );
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* How a plugin would contribute to this extension point:
|
|
49
|
+
*
|
|
50
|
+
* kosdev-plugin.json:
|
|
51
|
+
* ```json
|
|
52
|
+
* {
|
|
53
|
+
* "id": "my-analytics-plugin",
|
|
54
|
+
* "contributes": {
|
|
55
|
+
* "analyticsWidgets": [
|
|
56
|
+
* {
|
|
57
|
+
* "id": "sales-widget",
|
|
58
|
+
* "title": "Sales Analytics",
|
|
59
|
+
* "rank": 10,
|
|
60
|
+
* "component": "./SalesWidget"
|
|
61
|
+
* }
|
|
62
|
+
* ]
|
|
63
|
+
* }
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
//# sourceMappingURL=example-extension-point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-extension-point.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/example-extension-point.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,eAAO,MAAM,wBAAwB,2EAWnC,CAAC;AAGH,eAAO,MAAM,qBAAqB,+EA8BhC,CAAC;AAGH,UAAU,kBAAkB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;CACJ;AAED,UAAU,2BAA4B,SAAQ,kBAAkB;IAC9D,KAAK,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,eAAO,MAAM,qBAAqB,kHA4BhC,CAAC;;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ExtensionPointConfig, ExtensionPointDefinition } from './extension-point-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Registry for simplified extension points
|
|
5
|
+
* Keeps track of all extension points defined via this API
|
|
6
|
+
*/
|
|
7
|
+
export declare class SimplifiedExtensionPointRegistry {
|
|
8
|
+
private extensionPoints;
|
|
9
|
+
define<TData = any, TProcessed = TData, TProps = any>(config: ExtensionPointConfig<TData, TProcessed, TProps>): ExtensionPointDefinition<TData, TProcessed, TProps>;
|
|
10
|
+
private createReducer;
|
|
11
|
+
/**
|
|
12
|
+
* Get all registered extension points (for discovery/documentation)
|
|
13
|
+
*/
|
|
14
|
+
getAllExtensionPoints(): ExtensionPointDefinition[];
|
|
15
|
+
/**
|
|
16
|
+
* Get all defined extension points (registered and unregistered)
|
|
17
|
+
*/
|
|
18
|
+
getAllDefinedExtensionPoints(): ExtensionPointDefinition[];
|
|
19
|
+
/**
|
|
20
|
+
* Get a specific extension point definition
|
|
21
|
+
*/
|
|
22
|
+
getExtensionPoint(id: string): ExtensionPointDefinition | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Check if an extension point is registered
|
|
25
|
+
*/
|
|
26
|
+
hasExtensionPoint(id: string): boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const registry: SimplifiedExtensionPointRegistry;
|
|
29
|
+
/**
|
|
30
|
+
* Get the simplified extension point registry
|
|
31
|
+
* Useful for discovery tools and documentation generation
|
|
32
|
+
*/
|
|
33
|
+
export declare function getExtensionPointRegistry(): SimplifiedExtensionPointRegistry;
|
|
34
|
+
//# sourceMappingURL=extension-point-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-registry.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/extension-point-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAOjC;;;GAGG;AACH,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,eAAe,CAAoD;IAE3E,MAAM,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,KAAK,EAAE,MAAM,GAAG,GAAG,EAClD,MAAM,EAAE,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,GACtD,wBAAwB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC;IAiDtD,OAAO,CAAC,aAAa;IAgKrB;;OAEG;IACH,qBAAqB,IAAI,wBAAwB,EAAE;IAMnD;;OAEG;IACH,4BAA4B,IAAI,wBAAwB,EAAE;IAI1D;;OAEG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,wBAAwB,GAAG,SAAS;IAInE;;OAEG;IACH,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;CAGvC;AAGD,eAAO,MAAM,QAAQ,kCAAyC,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,gCAAgC,CAE5E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SchemaFieldInfo } from './extension-point-types';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Extract field information from a Zod schema for documentation purposes
|
|
6
|
+
* Returns field information that is safe to display in Plugin Explorer
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractSchemaFieldInfo(schema: z.ZodSchema): SchemaFieldInfo[];
|
|
9
|
+
//# sourceMappingURL=extension-point-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/extension-point-schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,CAAC,CAAC,SAAS,GAAG,eAAe,EAAE,CA4C7E"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { ValidationContext } from './define-extension-point';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Base schema for view-based DDK extension points
|
|
6
|
+
* Contains common fields that all DDK extension points share
|
|
7
|
+
*/
|
|
8
|
+
export declare const BaseViewExtensionSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
namespace: z.ZodString;
|
|
12
|
+
experienceId: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
title: string;
|
|
15
|
+
id: string;
|
|
16
|
+
experienceId: string;
|
|
17
|
+
namespace: string;
|
|
18
|
+
}, {
|
|
19
|
+
title: string;
|
|
20
|
+
id: string;
|
|
21
|
+
experienceId: string;
|
|
22
|
+
namespace: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Base schema with optional ranking support
|
|
26
|
+
*/
|
|
27
|
+
export declare const RankableViewExtensionSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
title: z.ZodString;
|
|
30
|
+
namespace: z.ZodString;
|
|
31
|
+
experienceId: z.ZodString;
|
|
32
|
+
} & {
|
|
33
|
+
rank: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
title: string;
|
|
36
|
+
id: string;
|
|
37
|
+
experienceId: string;
|
|
38
|
+
namespace: string;
|
|
39
|
+
rank?: number | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
title: string;
|
|
42
|
+
id: string;
|
|
43
|
+
experienceId: string;
|
|
44
|
+
namespace: string;
|
|
45
|
+
rank?: number | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Performs standard Zod validation and adds errors to the validation context
|
|
49
|
+
*
|
|
50
|
+
* @param schema The Zod schema to validate against
|
|
51
|
+
* @param data The data to validate
|
|
52
|
+
* @param context The validation context to add errors to
|
|
53
|
+
* @returns true if validation passed, false if errors were added
|
|
54
|
+
*/
|
|
55
|
+
export declare function validateWithSchema<T>(schema: z.ZodSchema<T>, data: unknown, context: ValidationContext): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Common validation for descriptor fields that should use dot notation
|
|
58
|
+
*
|
|
59
|
+
* @param descriptorField The name of the descriptor field (e.g., "setupDescriptor", "cuiDescriptor")
|
|
60
|
+
* @param descriptorValue The value of the descriptor field
|
|
61
|
+
* @param context The validation context to add warnings to
|
|
62
|
+
*/
|
|
63
|
+
export declare function validateDescriptorFormat(descriptorField: string, descriptorValue: string | undefined, context: ValidationContext): void;
|
|
64
|
+
/**
|
|
65
|
+
* Common validation for rank values to ensure they're reasonable
|
|
66
|
+
*
|
|
67
|
+
* @param rank The rank value to validate
|
|
68
|
+
* @param context The validation context to add warnings to
|
|
69
|
+
* @param maxReasonableRank The maximum reasonable rank value (default 1000)
|
|
70
|
+
*/
|
|
71
|
+
export declare function validateRank(rank: number | undefined, context: ValidationContext, maxReasonableRank?: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* Helper to create extension-specific schemas by extending the base
|
|
74
|
+
* and adding custom fields
|
|
75
|
+
*
|
|
76
|
+
* @param additionalFields Additional fields specific to this extension point
|
|
77
|
+
* @param options Options for schema creation
|
|
78
|
+
* @returns Extended schema with base fields and additional fields
|
|
79
|
+
*/
|
|
80
|
+
export declare function createExtensionSchema<T extends z.ZodRawShape>(additionalFields: T, options?: {
|
|
81
|
+
rankable?: boolean;
|
|
82
|
+
}): z.ZodObject<z.objectUtil.extendShape<(typeof BaseViewExtensionSchema)["shape"] | (typeof RankableViewExtensionSchema)["shape"], T>>;
|
|
83
|
+
/**
|
|
84
|
+
* Type-safe validation for rankable extensions
|
|
85
|
+
* Only validates rank if the data has a rank property
|
|
86
|
+
*/
|
|
87
|
+
export declare function validateRankIfPresent(data: unknown, context: ValidationContext, maxReasonableRank?: number): void;
|
|
88
|
+
/**
|
|
89
|
+
* Type helper for inferring types from extension schemas
|
|
90
|
+
*/
|
|
91
|
+
export type InferExtensionSchema<T extends z.ZodTypeAny> = z.infer<T>;
|
|
92
|
+
//# sourceMappingURL=extension-point-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-schemas.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/extension-point-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAiBlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;EAOtC,CAAC;AAEH;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACtB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAST;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,OAAO,EAAE,iBAAiB,GACzB,IAAI,CAMN;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,iBAAiB,EAC1B,iBAAiB,SAAO,GACvB,IAAI,CAMN;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,WAAW,EAC3D,gBAAgB,EAAE,CAAC,EACnB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GACnC,CAAC,CAAC,SAAS,CACZ,CAAC,CAAC,UAAU,CAAC,WAAW,CACpB,CAAC,OAAO,uBAAuB,CAAC,CAAC,OAAO,CAAC,GACzC,CAAC,OAAO,2BAA2B,CAAC,CAAC,OAAO,CAAC,EAC/C,CAAC,CACF,CACF,CAKA;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,iBAAiB,EAC1B,iBAAiB,SAAO,GACvB,IAAI,CAKN;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TransformContext } from './extension-point-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Generic transform helper for extension points that use the experience/view pattern
|
|
5
|
+
* Handles mapping experience IDs to experience data and flattening component properties
|
|
6
|
+
*/
|
|
7
|
+
export declare function createViewAwareTransform<TData extends Record<string, any>>(options?: {
|
|
8
|
+
/**
|
|
9
|
+
* Property name that contains the experience ID (default: "experienceId")
|
|
10
|
+
*/
|
|
11
|
+
experienceIdProperty?: keyof TData;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to flatten component properties to root level for useDynamicComponent compatibility (default: true)
|
|
14
|
+
*/
|
|
15
|
+
flattenComponentProperties?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Additional transform logic to apply after view mapping
|
|
18
|
+
*/
|
|
19
|
+
customTransform?: (data: TData, view: any, context: TransformContext) => any;
|
|
20
|
+
}): (data: TData, context: TransformContext) => any;
|
|
21
|
+
//# sourceMappingURL=extension-point-transforms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-transforms.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/extension-point-transforms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACxE,OAAO,GAAE;IACP;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,KAAK,CAAC;IACnC;;OAEG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;OAEG;IACH,eAAe,CAAC,EAAE,CAChB,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,GAAG,EACT,OAAO,EAAE,gBAAgB,KACtB,GAAG,CAAC;CACL,UAQQ,KAAK,WAAW,gBAAgB,SA4B/C"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { BasePluginExtension, PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Validation context for collecting validation issues
|
|
6
|
+
*/
|
|
7
|
+
export interface ValidationContext {
|
|
8
|
+
addError(message: string): void;
|
|
9
|
+
addWarning(message: string): void;
|
|
10
|
+
addInfo(message: string): void;
|
|
11
|
+
hasErrors(): boolean;
|
|
12
|
+
hasIssues(): boolean;
|
|
13
|
+
getIssues(): {
|
|
14
|
+
type: "error" | "warning" | "info";
|
|
15
|
+
message: string;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Context provided to transform functions
|
|
20
|
+
*/
|
|
21
|
+
export interface TransformContext {
|
|
22
|
+
remote: string;
|
|
23
|
+
sectionId: string;
|
|
24
|
+
experiences?: Record<string, any>;
|
|
25
|
+
contributions: ProcessedContributions;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Schema field information for documentation
|
|
29
|
+
*/
|
|
30
|
+
export interface SchemaFieldInfo {
|
|
31
|
+
name: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
type?: string;
|
|
34
|
+
required?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Configuration for defining a new extension point
|
|
38
|
+
*/
|
|
39
|
+
export interface ExtensionPointConfig<TData = any, TProcessed = TData, _TProps = any> {
|
|
40
|
+
/**
|
|
41
|
+
* Unique identifier for this extension point
|
|
42
|
+
* Convention: "ddk.{feature}" or "ddk.{feature}.{sub-feature}"
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional display name for documentation/discovery
|
|
47
|
+
*/
|
|
48
|
+
displayName?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Optional description for documentation/discovery
|
|
51
|
+
*/
|
|
52
|
+
description?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The contribution key in the plugin descriptor
|
|
55
|
+
* e.g., "myFeature" maps to contributes.myFeature in kosdev-plugin.json
|
|
56
|
+
*/
|
|
57
|
+
contributionKey: string;
|
|
58
|
+
/**
|
|
59
|
+
* Optional related extension points
|
|
60
|
+
* For example, a main extension might have .view and .definition variants
|
|
61
|
+
*/
|
|
62
|
+
relatedPoints?: {
|
|
63
|
+
view?: string;
|
|
64
|
+
definition?: string;
|
|
65
|
+
[key: string]: string | undefined;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Transform function to process raw contribution data
|
|
69
|
+
* Allows custom processing logic while maintaining type safety
|
|
70
|
+
*/
|
|
71
|
+
transform?: (data: TData, context: TransformContext) => TProcessed;
|
|
72
|
+
/**
|
|
73
|
+
* Optional validation function
|
|
74
|
+
* Use context.addError/addWarning/addInfo to collect validation issues
|
|
75
|
+
* Return "skip" to skip processing this contribution
|
|
76
|
+
*/
|
|
77
|
+
validate?: (data: TData, context: ValidationContext) => "skip" | void;
|
|
78
|
+
/**
|
|
79
|
+
* Whether this extension point uses view/experience pattern
|
|
80
|
+
* Default: false
|
|
81
|
+
*/
|
|
82
|
+
hasView?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Whether contributions should be ranked
|
|
85
|
+
* Default: false
|
|
86
|
+
*/
|
|
87
|
+
isRankable?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Optional Zod schema for runtime validation and documentation
|
|
90
|
+
* Provides both type safety and field introspection for Plugin Explorer
|
|
91
|
+
*/
|
|
92
|
+
schema?: z.ZodSchema<TData>;
|
|
93
|
+
/**
|
|
94
|
+
* Metadata for discovery/documentation
|
|
95
|
+
*/
|
|
96
|
+
metadata?: {
|
|
97
|
+
category?: string;
|
|
98
|
+
tags?: string[];
|
|
99
|
+
since?: string;
|
|
100
|
+
deprecated?: boolean;
|
|
101
|
+
replacedBy?: string;
|
|
102
|
+
owner?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The actual export name of this extension point in the code
|
|
105
|
+
* Used for documentation generation to show correct import statements
|
|
106
|
+
*/
|
|
107
|
+
exportName?: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Props for extension point components
|
|
112
|
+
*/
|
|
113
|
+
export interface ExtensionComponentProps {
|
|
114
|
+
/** Specific module to load (optional) */
|
|
115
|
+
module?: string;
|
|
116
|
+
/** Fallback component when extension not found */
|
|
117
|
+
fallback?: React.ReactNode;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Result of defining an extension point
|
|
121
|
+
*/
|
|
122
|
+
export interface ExtensionPointDefinition<TData = any, TProcessed = TData, TProps = any> {
|
|
123
|
+
/**
|
|
124
|
+
* The extension point configuration
|
|
125
|
+
*/
|
|
126
|
+
config: ExtensionPointConfig<TData, TProcessed, TProps>;
|
|
127
|
+
/**
|
|
128
|
+
* Extension point ID for use in components
|
|
129
|
+
*/
|
|
130
|
+
id: string;
|
|
131
|
+
/**
|
|
132
|
+
* Helper to get typed extensions (for future use with hooks)
|
|
133
|
+
*/
|
|
134
|
+
getExtensions?: (extensions: PluginExtensionsType) => Record<string, BasePluginExtension & {
|
|
135
|
+
data: TProcessed;
|
|
136
|
+
}>;
|
|
137
|
+
/**
|
|
138
|
+
* Registration status
|
|
139
|
+
*/
|
|
140
|
+
isRegistered: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Method to register this extension point
|
|
143
|
+
*/
|
|
144
|
+
register: () => void;
|
|
145
|
+
/**
|
|
146
|
+
* Get schema field information for documentation purposes
|
|
147
|
+
* Returns field info that can be safely displayed by Plugin Explorer
|
|
148
|
+
*/
|
|
149
|
+
getSchemaFieldInfo?: () => SchemaFieldInfo[];
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Extension point with hasView: true, guarantees Component property
|
|
153
|
+
*/
|
|
154
|
+
export interface ViewExtensionPointDefinition<TData = any, TProcessed = TData, TProps = any> extends ExtensionPointDefinition<TData, TProcessed, TProps> {
|
|
155
|
+
Component: React.ComponentType<ExtensionComponentProps & TProps>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Type-safe extension point ID helper
|
|
159
|
+
* Ensures consistent naming and helps with refactoring
|
|
160
|
+
*/
|
|
161
|
+
export declare function extensionPointId(namespace: string, feature: string, ...subFeatures: string[]): string;
|
|
162
|
+
//# sourceMappingURL=extension-point-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/extension-point-types.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAGH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,IAAI,OAAO,CAAC;IACrB,SAAS,IAAI,OAAO,CAAC;IACrB,SAAS,IAAI;QAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACxE;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,aAAa,EAAE,sBAAsB,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CACnC,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,GAAG;IAEb;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,aAAa,CAAC,EAAE;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;KACnC,CAAC;IAEF;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,KAAK,UAAU,CAAC;IAEnE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,KAAK,MAAM,GAAG,IAAI,CAAC;IAEtE;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB,CACvC,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,KAAK,EAClB,MAAM,GAAG,GAAG;IAEZ;;OAEG;IACH,MAAM,EAAE,oBAAoB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IAExD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,aAAa,CAAC,EAAE,CACd,UAAU,EAAE,oBAAoB,KAC7B,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG;QAAE,IAAI,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IAEhE;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IAIrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,eAAe,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAC3C,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,KAAK,EAClB,MAAM,GAAG,GAAG,CACZ,SAAQ,wBAAwB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC;IAC3D,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,uBAAuB,GAAG,MAAM,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,GAAG,WAAW,EAAE,MAAM,EAAE,GACvB,MAAM,CAGR"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ValidationContext } from './extension-point-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Implementation of ValidationContext for collecting validation issues
|
|
5
|
+
*/
|
|
6
|
+
export declare class ValidationContextImpl implements ValidationContext {
|
|
7
|
+
private issues;
|
|
8
|
+
addError(message: string): void;
|
|
9
|
+
addWarning(message: string): void;
|
|
10
|
+
addInfo(message: string): void;
|
|
11
|
+
hasErrors(): boolean;
|
|
12
|
+
hasIssues(): boolean;
|
|
13
|
+
getIssues(): {
|
|
14
|
+
type: "error" | "warning" | "info";
|
|
15
|
+
message: string;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Validation results cache
|
|
20
|
+
* Stores validation results by plugin ID to avoid re-running validation
|
|
21
|
+
*/
|
|
22
|
+
export declare class ValidationResultsCache {
|
|
23
|
+
private cache;
|
|
24
|
+
set(pluginId: string, results: {
|
|
25
|
+
type: "error" | "warning" | "info";
|
|
26
|
+
message: string;
|
|
27
|
+
}[]): void;
|
|
28
|
+
get(pluginId: string): {
|
|
29
|
+
type: "error" | "warning" | "info";
|
|
30
|
+
message: string;
|
|
31
|
+
}[];
|
|
32
|
+
clear(): void;
|
|
33
|
+
}
|
|
34
|
+
export declare const validationCache: ValidationResultsCache;
|
|
35
|
+
/**
|
|
36
|
+
* Get validation results for a plugin from the cache
|
|
37
|
+
* Returns validation results that were stored during plugin processing
|
|
38
|
+
*/
|
|
39
|
+
export declare function getValidationResults(pluginId: string): {
|
|
40
|
+
type: "error" | "warning" | "info";
|
|
41
|
+
message: string;
|
|
42
|
+
}[];
|
|
43
|
+
//# sourceMappingURL=extension-point-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-point-validation.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/extension-point-validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;GAEG;AACH,qBAAa,qBAAsB,YAAW,iBAAiB;IAC7D,OAAO,CAAC,MAAM,CACT;IAEL,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI/B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIjC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,SAAS,IAAI,OAAO;IAIpB,SAAS,IAAI,OAAO;IAIpB,SAAS,IAAI;QAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE;CAGvE;AAED;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,KAAK,CAGC;IAEd,GAAG,CACD,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE;QAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE;IAKpE,GAAG,CACD,QAAQ,EAAE,MAAM,GACf;QAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE;IAI5D,KAAK;CAGN;AAGD,eAAO,MAAM,eAAe,wBAA+B,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,GACf;IAAE,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAE3D"}
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
export * from './contribution-reducer';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './plugin-
|
|
10
|
-
export * from './process-kos-config';
|
|
11
|
-
export * from './resolve-best-extension';
|
|
12
|
-
export * from './settings-reducer';
|
|
13
|
-
export * from './setup-reducer';
|
|
14
|
-
export * from './state-action-reducer';
|
|
15
|
-
export * from './util-reducer';
|
|
1
|
+
export * from './processors/contribution-reducer';
|
|
2
|
+
export { generatePluginConfiguration } from './processors/process-kos-config';
|
|
3
|
+
export { initializeKosPlugins } from './processors/initialize-plugins';
|
|
4
|
+
export * from './plugin-system/plugin-extension-manager';
|
|
5
|
+
export * from './plugin-system/resolve-best-extension';
|
|
6
|
+
export * from './extension-points/define-extension-point';
|
|
7
|
+
export * from './extension-points/extension-point-schemas';
|
|
8
|
+
export * from './discovery/documentation-generator';
|
|
9
|
+
export * from './discovery/plugin-discovery-service';
|
|
16
10
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/utils/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/index.ts"],"names":[],"mappings":"AACA,cAAc,mCAAmC,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAIvE,cAAc,0CAA0C,CAAC;AACzD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAG3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC"}
|
package/lib/utils/{plugin-extension-manager.d.ts → plugin-system/plugin-extension-manager.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginExtension, PluginExtensionsType, ProcessedContributions } from '
|
|
2
|
-
import { DynamicRemotes } from '
|
|
1
|
+
import { PluginExtension, PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
|
|
2
|
+
import { DynamicRemotes } from '../../../types/global';
|
|
3
3
|
|
|
4
4
|
interface PluginsType {
|
|
5
5
|
remotes?: DynamicRemotes;
|
|
@@ -10,8 +10,6 @@ interface PluginsType {
|
|
|
10
10
|
export declare function initPluginManager(remotesOverride?: DynamicRemotes): Promise<PluginsType>;
|
|
11
11
|
export declare function getContributions(remotes?: DynamicRemotes): ProcessedContributions;
|
|
12
12
|
export declare function loadExtensions(remotes?: DynamicRemotes): Promise<PluginExtensionsType>;
|
|
13
|
-
export declare function getExtensions(extensionPointId: string): Promise<
|
|
14
|
-
data: any;
|
|
15
|
-
})[]>;
|
|
13
|
+
export declare function getExtensions(extensionPointId: string): Promise<PluginExtension<T>[]>;
|
|
16
14
|
export {};
|
|
17
15
|
//# sourceMappingURL=plugin-extension-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-extension-manager.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/plugin-system/plugin-extension-manager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAKhC,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;IACpD,aAAa,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,eAAe,EAAE,CAAC;CAChE;AAED,wBAAsB,iBAAiB,CACrC,eAAe,CAAC,EAAE,cAAc,GAC/B,OAAO,CAAC,WAAW,CAAC,CAgCtB;AAOD,wBAAgB,gBAAgB,CAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,sBAAsB,CAOxB;AAED,wBAAsB,cAAc,CAAC,OAAO,CAAC,EAAE,cAAc,iCAyD5D;AAED,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,MAAM,iCAG3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-extension-registry-init.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/plugin-system/plugin-extension-registry-init.ts"],"names":[],"mappings":"AAGA,OAAO,gDAAgD,CAAC"}
|
package/lib/utils/{plugin-extension-registry.d.ts → plugin-system/plugin-extension-registry.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginExtensionsType, ProcessedContributions } from '
|
|
1
|
+
import { PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
|
|
2
2
|
|
|
3
3
|
export type ExtensionReducer = (extensions: PluginExtensionsType, contributions: ProcessedContributions, experiences: any) => PluginExtensionsType;
|
|
4
4
|
export declare function registerExtensionReducer(reducer: ExtensionReducer): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-extension-registry.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/plugin-system/plugin-extension-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,oBAAoB,EAChC,aAAa,EAAE,sBAAsB,EACrC,WAAW,EAAE,GAAG,KACb,oBAAoB,CAAC;AAI1B,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,QAEjE;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,EAC1B,aAAa,EAAE,sBAAsB,EACrC,WAAW,EAAE,GAAG,GACf,oBAAoB,CAKtB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginExtensionsType, ProcessedContributions } from '
|
|
1
|
+
import { PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
|
|
2
2
|
|
|
3
3
|
export declare const EXTENSION_POINT_SETUP_DEF = "ddk.setup";
|
|
4
4
|
export declare const EXTENSION_POINT_SETUP_VIEW = "ddk.setup.view";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-reducer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/plugin-system/plugin-reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,0BAA0B,mBAAmB,CAAC;AAC3D,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,UAAU,aAAa;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE;QACJ,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AACD,eAAO,MAAM,aAAa,+GAKrB,aAAa,mBAED,sBAAsB,CAAC,aAAa,CAAC,iBACnC,sBAAsB,WAEjC,oBAAoB,OAAO,MAAM,yBAsCtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-best-extension.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/plugin-system/resolve-best-extension.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,eAAe,EAC5D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,SAAS,EACzC,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,UAAQ,GACZ,CAAC,GAAG,IAAI,CAgCV"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ProcessedContributions } from '../../../types/plugins';
|
|
2
|
+
import { DynamicRemotes } from '../../../types/global';
|
|
3
|
+
|
|
4
|
+
export declare const contributionReducer: (remotes: DynamicRemotes) => (acc: ProcessedContributions, key: string) => ProcessedContributions;
|
|
5
|
+
//# sourceMappingURL=contribution-reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution-reducer.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/processors/contribution-reducer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,eAAO,MAAM,mBAAmB,YACpB,cAAc,WAAW,sBAAsB,OAAO,MAAM,2BAwDrE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginExtension, PluginExtensionsType } from '
|
|
2
|
-
import { Contributions, DynamicRemotes } from '
|
|
1
|
+
import { PluginExtension, PluginExtensionsType } from '../../../types/plugins';
|
|
2
|
+
import { Contributions, DynamicRemotes } from '../../../types/global';
|
|
3
3
|
|
|
4
4
|
declare interface KosPluginsType {
|
|
5
5
|
__dynamicRemotes: DynamicRemotes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize-plugins.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/processors/initialize-plugins.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,iDAAiD,CAAC;AAEzD,OAAO,WAAW,cAAc;IAC9B,gBAAgB,EAAE,cAAc,CAAC;IACjC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;CAChD;AACD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,EAAE,cAAc,CAAC;KAC5B;CACF;AAED,MAAM,WAAW,UAAU;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,UAAU,EAAE,UAAU,EAAE,CAAC;QACzB,WAAW,EAAE,aAAa,CAAC;KAC5B,CAAC;CACH;AAED,UAAU,eAAe;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,cAAc,sBAiBjB,CAAC;AAWX;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,WAAkB,eAAe,oCAuDjE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initialization file for simplified extension points
|
|
3
|
+
*
|
|
4
|
+
* This file ensures that extension points defined with the new simplified API
|
|
5
|
+
* are registered when the plugin system initializes. Import any new extension
|
|
6
|
+
* points here to register them automatically.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Import real extension points here to replace legacy reducers
|
|
10
|
+
* Note: DDK-specific extension points (like utilities) are now defined in their respective applications
|
|
11
|
+
*/
|
|
12
|
+
export declare const simplifiedExtensionsInitialized = true;
|
|
13
|
+
//# sourceMappingURL=initialize-simplified-extensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize-simplified-extensions.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/processors/initialize-simplified-extensions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;GAGG;AAIH,eAAO,MAAM,+BAA+B,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-kos-config.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/processors/process-kos-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAS3D,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,GAAG,EAAE;YACH,IAAI,EAAE;gBACJ,MAAM,EAAE,eAAe,CAAC;aACzB,CAAC;SACH,CAAC;KACH,CAAC;CACH;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE;QACH,EAAE,EAAE;YACF,MAAM,EAAE,eAAe,CAAC;SACzB,CAAC;KACH,CAAC;CACH;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAWlD,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,aAAa,GACtB,GAAG,CAgSL"}
|