@kosdev-code/kos-ui-plugin 2.1.18 → 2.1.20
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-CAlVz5vA.cjs +266 -0
- package/documentation-generator-CAlVz5vA.cjs.map +1 -0
- package/documentation-generator-Di4c9D9P.js +2337 -0
- package/documentation-generator-Di4c9D9P.js.map +1 -0
- package/index.cjs +69 -69
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +938 -848
- package/index.js.map +1 -1
- package/lib/components/dynamic-component/dynamic-component.d.ts +69 -0
- package/lib/components/dynamic-component/dynamic-component.d.ts.map +1 -1
- package/lib/contexts/index.d.ts +1 -0
- package/lib/contexts/index.d.ts.map +1 -1
- package/lib/contexts/plugins-provider/plugins-provider.d.ts.map +1 -1
- package/lib/contexts/reactive-extension-registry-context.d.ts +10 -0
- package/lib/contexts/reactive-extension-registry-context.d.ts.map +1 -0
- package/lib/hooks/index.d.ts +4 -2
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/use-dynamic-component.d.ts +12 -1
- package/lib/hooks/use-dynamic-component.d.ts.map +1 -1
- package/lib/hooks/use-extension-component.d.ts +11 -0
- package/lib/hooks/use-extension-component.d.ts.map +1 -1
- package/lib/hooks/use-extension-point.d.ts +95 -0
- package/lib/hooks/use-extension-point.d.ts.map +1 -0
- package/lib/hooks/use-reactive-extension-registry.d.ts +20 -0
- package/lib/hooks/use-reactive-extension-registry.d.ts.map +1 -0
- package/lib/hooks/use-typed-extensions.d.ts.map +1 -1
- package/lib/utils/contribution-registry.d.ts +170 -0
- package/lib/utils/contribution-registry.d.ts.map +1 -0
- package/lib/utils/extension-points/extension-point-registry.d.ts.map +1 -1
- package/lib/utils/extension-points/extension-point-schemas.d.ts +4 -4
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/plugin-system/plugin-extension-manager.d.ts.map +1 -1
- package/lib/utils/processors/initialize-plugins.d.ts.map +1 -1
- package/lib/utils/reactive-extension-registry.d.ts +140 -0
- package/lib/utils/reactive-extension-registry.d.ts.map +1 -0
- package/lib/webpack/index.d.ts +2 -0
- package/lib/webpack/index.d.ts.map +1 -1
- package/lib/webpack/with-plugin-dev-aggregator.d.ts +94 -0
- package/lib/webpack/with-plugin-dev-aggregator.d.ts.map +1 -0
- package/lib/webpack/with-plugin-dev-server.d.ts +113 -0
- package/lib/webpack/with-plugin-dev-server.d.ts.map +1 -0
- package/package.json +2 -2
- package/types/contribution-enablement.d.ts +293 -0
- package/types/contribution-enablement.d.ts.map +1 -0
- package/types/plugins.d.ts +8 -0
- package/utils.cjs +1 -1
- package/utils.cjs.map +1 -1
- package/utils.js +29 -291
- package/utils.js.map +1 -1
- package/webpack.cjs +3 -12
- package/webpack.cjs.map +1 -1
- package/webpack.js +455 -727
- package/webpack.js.map +1 -1
- package/documentation-generator-DFaIDo0E.cjs +0 -266
- package/documentation-generator-DFaIDo0E.cjs.map +0 -1
- package/documentation-generator-auruIa_o.js +0 -1560
- package/documentation-generator-auruIa_o.js.map +0 -1
|
@@ -1,11 +1,80 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Props for DynamicComponent
|
|
5
|
+
*/
|
|
3
6
|
interface Props {
|
|
7
|
+
/**
|
|
8
|
+
* Extension point identifier (e.g., 'ddk.settings.view')
|
|
9
|
+
*/
|
|
4
10
|
extension: string;
|
|
11
|
+
/**
|
|
12
|
+
* Fallback component to show when no component available
|
|
13
|
+
*/
|
|
5
14
|
fallback?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Specific module ID to load
|
|
17
|
+
* If not provided, loads best-ranked enabled contribution
|
|
18
|
+
*/
|
|
6
19
|
module?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Props to pass to the loaded component
|
|
22
|
+
*/
|
|
7
23
|
props?: any;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to show fallback when specified module is disabled
|
|
26
|
+
* Default: true
|
|
27
|
+
*/
|
|
28
|
+
fallbackOnDisabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to automatically switch to next best when current becomes disabled
|
|
31
|
+
* Only applies if fallbackOnDisabled is false
|
|
32
|
+
* Default: false
|
|
33
|
+
*/
|
|
34
|
+
autoSwitchOnDisabled?: boolean;
|
|
8
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* DynamicComponent - Dynamically loads and renders plugin components
|
|
38
|
+
*
|
|
39
|
+
* This component provides reactive plugin loading with automatic re-rendering
|
|
40
|
+
* when contribution states change. It supports:
|
|
41
|
+
* - Automatic filtering of disabled contributions
|
|
42
|
+
* - Fallback rendering when modules become disabled
|
|
43
|
+
* - Auto-switching to best alternative when current module disabled
|
|
44
|
+
* - Backward compatibility with existing usage
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Basic usage - shows best enabled contribution
|
|
49
|
+
* <DynamicComponent
|
|
50
|
+
* extension="ddk.settings.view"
|
|
51
|
+
* fallback={<DefaultSettings />}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* // Specific module with fallback on disabled
|
|
58
|
+
* <DynamicComponent
|
|
59
|
+
* extension="ddk.features"
|
|
60
|
+
* module="premium-feature"
|
|
61
|
+
* fallback={<BasicFeature />}
|
|
62
|
+
* fallbackOnDisabled={true}
|
|
63
|
+
* />
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* // Auto-switch to alternative when disabled
|
|
69
|
+
* <DynamicComponent
|
|
70
|
+
* extension="ddk.features"
|
|
71
|
+
* module="premium-feature"
|
|
72
|
+
* fallback={<BasicFeature />}
|
|
73
|
+
* fallbackOnDisabled={false}
|
|
74
|
+
* autoSwitchOnDisabled={true}
|
|
75
|
+
* />
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
9
78
|
export declare const DynamicComponent: React.FunctionComponent<Props>;
|
|
10
79
|
export {};
|
|
11
80
|
//# sourceMappingURL=dynamic-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-component.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/components/dynamic-component/dynamic-component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"dynamic-component.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/components/dynamic-component/dynamic-component.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IAEZ;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAgD3D,CAAC"}
|
package/lib/contexts/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uCAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-provider.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/contexts/plugins-provider/plugins-provider.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"plugins-provider.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/contexts/plugins-provider/plugins-provider.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAM9D,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,MAAM,WAAW,oBAAoB;IACnC,CAAC,CAAC,EAAE,MAAM,GAAG;QACX,CAAC,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;KAC9B,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,kDAAoD,CAAC;AAEhF,UAAU,KAAK;IACb,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE;QACb,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,CAAC,EAAE;YACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;YAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC,CAAC;CACH;AAgBD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CACrD,iBAAiB,CAAC,KAAK,CAAC,CAuFzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,mBAQhC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactiveExtensionRegistry } from '../utils/reactive-extension-registry';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Context for ReactiveExtensionRegistry
|
|
5
|
+
*
|
|
6
|
+
* Provides access to the reactive extension registry throughout the component tree.
|
|
7
|
+
* The registry is created by the PluginsProvider and manages reactive extension state.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ReactiveExtensionRegistryContext: import('react').Context<ReactiveExtensionRegistry | null>;
|
|
10
|
+
//# sourceMappingURL=reactive-extension-registry-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactive-extension-registry-context.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/contexts/reactive-extension-registry-context.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAEtF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,2DACU,CAAC"}
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './use-dynamic-component';
|
|
2
|
-
export * from './use-typed-extensions';
|
|
3
|
-
export * from './use-plugin-discovery';
|
|
4
2
|
export * from './use-extension-component';
|
|
5
3
|
export * from './use-extension-i18n';
|
|
4
|
+
export * from './use-extension-point';
|
|
5
|
+
export * from './use-plugin-discovery';
|
|
6
|
+
export * from './use-reactive-extension-registry';
|
|
7
|
+
export * from './use-typed-extensions';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/hooks/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC"}
|
|
@@ -12,6 +12,17 @@ interface Props {
|
|
|
12
12
|
* If not provided, the plugin with the **lowest rank** for the extension point is used.
|
|
13
13
|
*/
|
|
14
14
|
module?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to show fallback when specified module is disabled
|
|
17
|
+
* Default: true
|
|
18
|
+
*/
|
|
19
|
+
fallbackOnDisabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to automatically switch to next best when current becomes disabled
|
|
22
|
+
* Only applies if fallbackOnDisabled is false
|
|
23
|
+
* Default: false
|
|
24
|
+
*/
|
|
25
|
+
autoSwitchOnDisabled?: boolean;
|
|
15
26
|
}
|
|
16
27
|
type DynamicComponentResult = [
|
|
17
28
|
React.FunctionComponent | null,
|
|
@@ -29,6 +40,6 @@ type DynamicComponentResult = [
|
|
|
29
40
|
* @param props.module (Optional) Specific module ID to use, otherwise the highest-priority plugin is loaded
|
|
30
41
|
* @returns A tuple: `[Component, PluginExtension]`
|
|
31
42
|
*/
|
|
32
|
-
export declare const useDynamicComponent: ({ extension, module, }: Props) => DynamicComponentResult;
|
|
43
|
+
export declare const useDynamicComponent: ({ extension, module, fallbackOnDisabled, autoSwitchOnDisabled, }: Props) => DynamicComponentResult;
|
|
33
44
|
export {};
|
|
34
45
|
//# sourceMappingURL=use-dynamic-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-dynamic-component.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-dynamic-component.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"use-dynamic-component.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-dynamic-component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,qBAAqB,CAAC;AAI7B,UAAU,KAAK;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,KAAK,sBAAsB,GAAG;IAC5B,KAAK,CAAC,iBAAiB,GAAG,IAAI;IAC9B,mBAAmB,GAAG,IAAI;CAC3B,CAAC;AASF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,qEAK7B,KAAK,2BAqEP,CAAC"}
|
|
@@ -7,6 +7,17 @@ import { default as React } from 'react';
|
|
|
7
7
|
export interface ExtensionComponentProps {
|
|
8
8
|
module?: string;
|
|
9
9
|
fallback?: React.ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to show fallback when specified module is disabled
|
|
12
|
+
* Default: true
|
|
13
|
+
*/
|
|
14
|
+
fallbackOnDisabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether to automatically switch to next best when current becomes disabled
|
|
17
|
+
* Only applies if fallbackOnDisabled is false
|
|
18
|
+
* Default: false
|
|
19
|
+
*/
|
|
20
|
+
autoSwitchOnDisabled?: boolean;
|
|
10
21
|
}
|
|
11
22
|
/**
|
|
12
23
|
* Hook that creates a strongly typed React component for an extension point
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-extension-component.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-extension-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"use-extension-component.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-extension-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAEhG;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,KAAK,EAClB,MAAM,GAAG,GAAG,EAEZ,UAAU,EAAE,wBAAwB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,GAC9D,KAAK,CAAC,aAAa,CAAC,uBAAuB,GAAG,MAAM,CAAC,GAAG,IAAI,CAiC9D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,GAAG,GAAG,EACX,UAAU,GAAG,KAAK,EAClB,MAAM,GAAG,GAAG,EAEZ,UAAU,EAAE,wBAAwB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,GAC9D,KAAK,CAAC,aAAa,CAAC,uBAAuB,GAAG,MAAM,CAAC,GAAG,IAAI,CA+B9D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,GAAG,GAAG,EACpD,gBAAgB,EAAE,MAAM,GACvB,KAAK,CAAC,aAAa,CAAC,uBAAuB,GAAG,MAAM,CAAC,GAAG,IAAI,CAyC9D"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { PluginExtension } from '../../types/plugins';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* NOTE: This file exports `useReactiveExtensions` (not `useExtensionPoint`)
|
|
5
|
+
* to avoid naming conflict with the existing `useExtensionPoint` hook in
|
|
6
|
+
* use-plugin-discovery.tsx which returns discovery metadata (ExtensionPointInfo).
|
|
7
|
+
*
|
|
8
|
+
* This hook returns reactive plugin extensions with automatic re-rendering.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Options for useExtensionPoint hook
|
|
12
|
+
*/
|
|
13
|
+
export interface UseExtensionPointOptions {
|
|
14
|
+
/**
|
|
15
|
+
* If true, include disabled contributions in results
|
|
16
|
+
* Default: false
|
|
17
|
+
*/
|
|
18
|
+
includeDisabled?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If true, automatically resolve the best contribution
|
|
21
|
+
* Default: false
|
|
22
|
+
*/
|
|
23
|
+
autoResolve?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Return value from useExtensionPoint hook
|
|
27
|
+
*/
|
|
28
|
+
export interface UseExtensionPointResult {
|
|
29
|
+
/**
|
|
30
|
+
* Extensions for the extension point, filtered by enabled state
|
|
31
|
+
*/
|
|
32
|
+
extensions: Record<string, PluginExtension>;
|
|
33
|
+
/**
|
|
34
|
+
* Best contribution (if autoResolve enabled)
|
|
35
|
+
*/
|
|
36
|
+
best: PluginExtension | null;
|
|
37
|
+
/**
|
|
38
|
+
* Whether extensions are loading (always false for now)
|
|
39
|
+
*/
|
|
40
|
+
isLoading: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* React hook to use reactive extensions for an extension point
|
|
44
|
+
*
|
|
45
|
+
* This hook provides reactive access to plugin extensions for a specific extension point.
|
|
46
|
+
* It automatically subscribes to contribution state changes and triggers re-renders
|
|
47
|
+
* when contributions are enabled/disabled or when the best contribution changes.
|
|
48
|
+
*
|
|
49
|
+
* Key features:
|
|
50
|
+
* - Filters extensions by enabled state (by default)
|
|
51
|
+
* - Subscribes to extension point changes
|
|
52
|
+
* - Triggers re-render when contributions change
|
|
53
|
+
* - Automatically resolves best contribution (optional)
|
|
54
|
+
* - Cleans up subscriptions on unmount
|
|
55
|
+
*
|
|
56
|
+
* @param extensionPoint - Extension point identifier (e.g., 'ddk.settings.view')
|
|
57
|
+
* @param options - Configuration options
|
|
58
|
+
* @returns Object with extensions, best contribution, and loading state
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* // Get only enabled extensions
|
|
63
|
+
* function SettingsPage() {
|
|
64
|
+
* const { extensions } = useReactiveExtensions('ddk.settings.view');
|
|
65
|
+
* // Component re-renders when contributions are enabled/disabled
|
|
66
|
+
* return <div>{Object.keys(extensions).length} settings available</div>;
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* // Auto-resolve best contribution
|
|
73
|
+
* function HomePage() {
|
|
74
|
+
* const { best } = useReactiveExtensions('ddk.home.hero', {
|
|
75
|
+
* autoResolve: true
|
|
76
|
+
* });
|
|
77
|
+
* // Component re-renders when best contribution changes
|
|
78
|
+
* return <div>Best hero: {best?.id}</div>;
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```typescript
|
|
84
|
+
* // Include disabled contributions
|
|
85
|
+
* function DebugPanel() {
|
|
86
|
+
* const { extensions } = useReactiveExtensions('ddk.features', {
|
|
87
|
+
* includeDisabled: true
|
|
88
|
+
* });
|
|
89
|
+
* // Shows all contributions regardless of enabled state
|
|
90
|
+
* return <div>Total features: {Object.keys(extensions).length}</div>;
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare function useReactiveExtensions(extensionPoint: string, options?: UseExtensionPointOptions): UseExtensionPointResult;
|
|
95
|
+
//# sourceMappingURL=use-extension-point.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-extension-point.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-extension-point.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAI3D;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE5C;;OAEG;IACH,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,wBAAwB,GACjC,uBAAuB,CAsCzB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for accessing the ReactiveExtensionRegistry
|
|
3
|
+
*
|
|
4
|
+
* Provides access to the reactive extension registry that filters contributions
|
|
5
|
+
* by enabled state and emits change events.
|
|
6
|
+
*
|
|
7
|
+
* @throws Error if used outside of ReactiveExtensionRegistryProvider
|
|
8
|
+
* @returns ReactiveExtensionRegistry instance
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* function MyComponent() {
|
|
13
|
+
* const registry = useReactiveExtensionRegistry();
|
|
14
|
+
* const extensions = registry.getExtensions('ddk.settings.view');
|
|
15
|
+
* // ...
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const useReactiveExtensionRegistry: () => import('../utils').ReactiveExtensionRegistry;
|
|
20
|
+
//# sourceMappingURL=use-reactive-extension-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-reactive-extension-registry.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-reactive-extension-registry.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,4BAA4B,oDAQxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-typed-extensions.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-typed-extensions.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEhF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"use-typed-extensions.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/hooks/use-typed-extensions.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE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@@
|
|
|
1
|
+
import { ContributionStateChangeEvent, DynamicContribution, EnablementContext, IContributionRegistry } from '../../types/contribution-enablement';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Centralized contribution enablement registry
|
|
5
|
+
*
|
|
6
|
+
* Manages the enabled/disabled state of all plugin contributions in the system.
|
|
7
|
+
* Provides subscription mechanism for reactive updates when contribution state changes.
|
|
8
|
+
*
|
|
9
|
+
* This is a singleton that maintains runtime state for contribution enablement.
|
|
10
|
+
* State is ephemeral and resets on page reload.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Enable/disable a contribution
|
|
15
|
+
* ContributionRegistry.setEnabled('advanced-settings', false, 'Basic mode active');
|
|
16
|
+
*
|
|
17
|
+
* // Check if contribution is enabled
|
|
18
|
+
* if (ContributionRegistry.isEnabled('advanced-settings')) {
|
|
19
|
+
* // Show advanced settings
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* // Subscribe to changes
|
|
23
|
+
* const unsubscribe = ContributionRegistry.subscribe((event) => {
|
|
24
|
+
* console.log(`${event.contributionId} is now ${event.enabled ? 'enabled' : 'disabled'}`);
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare class ContributionRegistryImpl implements IContributionRegistry {
|
|
29
|
+
/**
|
|
30
|
+
* Map of contribution ID to its dynamic contribution state
|
|
31
|
+
*/
|
|
32
|
+
private contributions;
|
|
33
|
+
/**
|
|
34
|
+
* Map of extension point to contribution IDs
|
|
35
|
+
* Allows efficient lookup of contributions by extension point
|
|
36
|
+
*/
|
|
37
|
+
private extensionPointIndex;
|
|
38
|
+
/**
|
|
39
|
+
* Global listeners for all state changes
|
|
40
|
+
*/
|
|
41
|
+
private globalListeners;
|
|
42
|
+
/**
|
|
43
|
+
* Extension point-scoped listeners
|
|
44
|
+
* Map of extension point to listeners
|
|
45
|
+
*/
|
|
46
|
+
private extensionPointListeners;
|
|
47
|
+
/**
|
|
48
|
+
* Current enablement context for conditional evaluation
|
|
49
|
+
*/
|
|
50
|
+
private enablementContext;
|
|
51
|
+
/**
|
|
52
|
+
* Register a contribution in the registry
|
|
53
|
+
*
|
|
54
|
+
* This is called during plugin initialization to register all contributions
|
|
55
|
+
* with their default enabled state (true).
|
|
56
|
+
*
|
|
57
|
+
* @param contributionId - Unique identifier for the contribution
|
|
58
|
+
* @param extensionPoint - Extension point this contribution belongs to
|
|
59
|
+
* @param contribution - The contribution object
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
register(contributionId: string, extensionPoint: string, contribution: Omit<DynamicContribution, "enabled">): void;
|
|
63
|
+
/**
|
|
64
|
+
* Update the enablement context
|
|
65
|
+
*
|
|
66
|
+
* The context is used when evaluating conditional enablement functions.
|
|
67
|
+
*
|
|
68
|
+
* @param context - New enablement context
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
setContext(context: Partial<EnablementContext>): void;
|
|
72
|
+
/**
|
|
73
|
+
* Set enabled state for a contribution
|
|
74
|
+
*
|
|
75
|
+
* Updates the contribution's enabled state and emits a
|
|
76
|
+
* ContributionStateChangeEvent to all subscribers.
|
|
77
|
+
*
|
|
78
|
+
* @param contributionId - Unique identifier of the contribution
|
|
79
|
+
* @param enabled - New enabled state (true = enabled, false = disabled)
|
|
80
|
+
* @param reason - Optional human-readable reason for the change
|
|
81
|
+
*/
|
|
82
|
+
setEnabled(contributionId: string, enabled: boolean, reason?: string): void;
|
|
83
|
+
/**
|
|
84
|
+
* Get enabled state for a contribution
|
|
85
|
+
*
|
|
86
|
+
* Checks both the enabled boolean field and evaluates any
|
|
87
|
+
* enabledCondition function if present. Returns true only if
|
|
88
|
+
* both checks pass.
|
|
89
|
+
*
|
|
90
|
+
* @param contributionId - Unique identifier of the contribution
|
|
91
|
+
* @returns true if contribution is enabled, false otherwise
|
|
92
|
+
*/
|
|
93
|
+
isEnabled(contributionId: string): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Subscribe to all contribution state changes
|
|
96
|
+
*
|
|
97
|
+
* Registers a listener that will be called whenever any contribution's
|
|
98
|
+
* enabled state changes. The listener receives a ContributionStateChangeEvent.
|
|
99
|
+
*
|
|
100
|
+
* @param listener - Callback function to handle state change events
|
|
101
|
+
* @returns Unsubscribe function to stop receiving events
|
|
102
|
+
*/
|
|
103
|
+
subscribe(listener: (event: ContributionStateChangeEvent) => void): () => void;
|
|
104
|
+
/**
|
|
105
|
+
* Subscribe to changes for a specific extension point
|
|
106
|
+
*
|
|
107
|
+
* Like subscribe(), but only emits events for contributions
|
|
108
|
+
* belonging to the specified extension point.
|
|
109
|
+
*
|
|
110
|
+
* @param extensionPoint - Extension point identifier to monitor
|
|
111
|
+
* @param listener - Callback function to handle state change events
|
|
112
|
+
* @returns Unsubscribe function to stop receiving events
|
|
113
|
+
*/
|
|
114
|
+
subscribeToExtensionPoint(extensionPoint: string, listener: (event: ContributionStateChangeEvent) => void): () => void;
|
|
115
|
+
/**
|
|
116
|
+
* Batch update multiple contributions atomically
|
|
117
|
+
*
|
|
118
|
+
* Updates multiple contribution states in a single atomic operation.
|
|
119
|
+
* All updates succeed or all fail together. Emits one event per
|
|
120
|
+
* contribution that changed state.
|
|
121
|
+
*
|
|
122
|
+
* @param updates - Array of contribution updates to apply
|
|
123
|
+
*/
|
|
124
|
+
batchUpdate(updates: Array<{
|
|
125
|
+
contributionId: string;
|
|
126
|
+
enabled: boolean;
|
|
127
|
+
reason?: string;
|
|
128
|
+
}>): void;
|
|
129
|
+
/**
|
|
130
|
+
* Get all contributions for an extension point
|
|
131
|
+
*
|
|
132
|
+
* Returns an array of DynamicContribution objects for the specified
|
|
133
|
+
* extension point. By default, only returns enabled contributions.
|
|
134
|
+
*
|
|
135
|
+
* @param extensionPoint - Extension point identifier
|
|
136
|
+
* @param includeDisabled - If true, include disabled contributions in results
|
|
137
|
+
* @returns Array of contributions for the extension point
|
|
138
|
+
*/
|
|
139
|
+
getContributions(extensionPoint: string, includeDisabled?: boolean): DynamicContribution[];
|
|
140
|
+
/**
|
|
141
|
+
* Find the extension point for a contribution ID
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
private findExtensionPoint;
|
|
145
|
+
/**
|
|
146
|
+
* Emit state change event to all relevant listeners
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
private emitStateChange;
|
|
150
|
+
/**
|
|
151
|
+
* Clear all state (useful for testing or cleanup)
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
reset(): void;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Singleton instance of ContributionRegistry
|
|
158
|
+
*
|
|
159
|
+
* Use this instance throughout the application to manage contribution state.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```typescript
|
|
163
|
+
* import { ContributionRegistry } from '@kosdev-code/kos-ui-plugin';
|
|
164
|
+
*
|
|
165
|
+
* ContributionRegistry.setEnabled('my-contribution', false);
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export declare const ContributionRegistry: ContributionRegistryImpl;
|
|
169
|
+
export {};
|
|
170
|
+
//# sourceMappingURL=contribution-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contribution-registry.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/contribution-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,cAAM,wBAAyB,YAAW,qBAAqB;IAC7D;;OAEG;IACH,OAAO,CAAC,aAAa,CAA+C;IAEpE;;;OAGG;IACH,OAAO,CAAC,mBAAmB,CAAuC;IAElE;;OAEG;IACH,OAAO,CAAC,eAAe,CACX;IAEZ;;;OAGG;IACH,OAA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|
|
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;
|
|
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;AAUH,OAAO,KAAK,EACV,oBAAoB,EACpB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAMjC;;;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;IA0LrB;;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;IAItC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS;CAIrD;AAGD,eAAO,MAAM,QAAQ,kCAAyC,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,yBAAyB,IAAI,gCAAgC,CAE5E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS,CAEnE"}
|
|
@@ -11,14 +11,14 @@ export declare const BaseViewExtensionSchema: z.ZodObject<{
|
|
|
11
11
|
namespace: z.ZodString;
|
|
12
12
|
experienceId: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
experienceId: string;
|
|
15
14
|
id: string;
|
|
16
15
|
title: string;
|
|
16
|
+
experienceId: string;
|
|
17
17
|
namespace: string;
|
|
18
18
|
}, {
|
|
19
|
-
experienceId: string;
|
|
20
19
|
id: string;
|
|
21
20
|
title: string;
|
|
21
|
+
experienceId: string;
|
|
22
22
|
namespace: string;
|
|
23
23
|
}>;
|
|
24
24
|
/**
|
|
@@ -32,15 +32,15 @@ export declare const RankableViewExtensionSchema: z.ZodObject<{
|
|
|
32
32
|
} & {
|
|
33
33
|
rank: z.ZodOptional<z.ZodNumber>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
experienceId: string;
|
|
36
35
|
id: string;
|
|
37
36
|
title: string;
|
|
37
|
+
experienceId: string;
|
|
38
38
|
namespace: string;
|
|
39
39
|
rank?: number | undefined;
|
|
40
40
|
}, {
|
|
41
|
-
experienceId: string;
|
|
42
41
|
id: string;
|
|
43
42
|
title: string;
|
|
43
|
+
experienceId: string;
|
|
44
44
|
namespace: string;
|
|
45
45
|
rank?: number | undefined;
|
|
46
46
|
}>;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export { generatePluginConfiguration } from './processors/process-kos-config';
|
|
|
3
3
|
export { initializeKosPlugins } from './processors/initialize-plugins';
|
|
4
4
|
export * from './plugin-system/plugin-extension-manager';
|
|
5
5
|
export * from './plugin-system/resolve-best-extension';
|
|
6
|
+
export { ContributionRegistry } from './contribution-registry';
|
|
7
|
+
export { ReactiveExtensionRegistry } from './reactive-extension-registry';
|
|
8
|
+
export type { ExtensionPointChangeEvent } from './reactive-extension-registry';
|
|
6
9
|
export * from './extension-points/define-extension-point';
|
|
7
10
|
export * from './extension-points/extension-point-schemas';
|
|
8
11
|
export * from './discovery/documentation-generator';
|
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":"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;
|
|
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;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,YAAY,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG/E,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAG3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC"}
|
|
@@ -1 +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;
|
|
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;AAQhC,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,iCAiF5D;AAED,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,MAAM,8BAG3D"}
|
|
@@ -1 +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,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,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,
|
|
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,C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