@kosdev-code/kos-ui-plugin 0.1.0-dev.5053

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/documentation-generator-DFaIDo0E.cjs +266 -0
  2. package/documentation-generator-DFaIDo0E.cjs.map +1 -0
  3. package/documentation-generator-auruIa_o.js +1560 -0
  4. package/documentation-generator-auruIa_o.js.map +1 -0
  5. package/index.cjs +437 -0
  6. package/index.cjs.map +1 -0
  7. package/index.d.ts +5 -0
  8. package/index.d.ts.map +1 -0
  9. package/index.js +2276 -0
  10. package/index.js.map +1 -0
  11. package/lib/components/dynamic-component/dynamic-component.d.ts +11 -0
  12. package/lib/components/dynamic-component/dynamic-component.d.ts.map +1 -0
  13. package/lib/components/dynamic-component/error-boundary.d.ts +17 -0
  14. package/lib/components/dynamic-component/error-boundary.d.ts.map +1 -0
  15. package/lib/components/dynamic-component/index.d.ts +2 -0
  16. package/lib/components/dynamic-component/index.d.ts.map +1 -0
  17. package/lib/components/dynamic-container/dynamic-container.d.ts +12 -0
  18. package/lib/components/dynamic-container/dynamic-container.d.ts.map +1 -0
  19. package/lib/components/dynamic-container/index.d.ts +2 -0
  20. package/lib/components/dynamic-container/index.d.ts.map +1 -0
  21. package/lib/components/index.d.ts +3 -0
  22. package/lib/components/index.d.ts.map +1 -0
  23. package/lib/components/plugin-explorer/extension-point-list.d.ts +13 -0
  24. package/lib/components/plugin-explorer/extension-point-list.d.ts.map +1 -0
  25. package/lib/components/plugin-explorer/floating-plugin-explorer.d.ts +13 -0
  26. package/lib/components/plugin-explorer/floating-plugin-explorer.d.ts.map +1 -0
  27. package/lib/components/plugin-explorer/index.d.ts +10 -0
  28. package/lib/components/plugin-explorer/index.d.ts.map +1 -0
  29. package/lib/components/plugin-explorer/plugin-card.d.ts +10 -0
  30. package/lib/components/plugin-explorer/plugin-card.d.ts.map +1 -0
  31. package/lib/components/plugin-explorer/plugin-explorer.d.ts +12 -0
  32. package/lib/components/plugin-explorer/plugin-explorer.d.ts.map +1 -0
  33. package/lib/components/plugin-explorer/plugin-health-dashboard.d.ts +9 -0
  34. package/lib/components/plugin-explorer/plugin-health-dashboard.d.ts.map +1 -0
  35. package/lib/contexts/index.d.ts +2 -0
  36. package/lib/contexts/index.d.ts.map +1 -0
  37. package/lib/contexts/plugins-provider/index.d.ts +2 -0
  38. package/lib/contexts/plugins-provider/index.d.ts.map +1 -0
  39. package/lib/contexts/plugins-provider/plugins-provider.d.ts +50 -0
  40. package/lib/contexts/plugins-provider/plugins-provider.d.ts.map +1 -0
  41. package/lib/hooks/index.d.ts +6 -0
  42. package/lib/hooks/index.d.ts.map +1 -0
  43. package/lib/hooks/use-dynamic-component.d.ts +34 -0
  44. package/lib/hooks/use-dynamic-component.d.ts.map +1 -0
  45. package/lib/hooks/use-extension-component.d.ts +26 -0
  46. package/lib/hooks/use-extension-component.d.ts.map +1 -0
  47. package/lib/hooks/use-extension-i18n.d.ts +69 -0
  48. package/lib/hooks/use-extension-i18n.d.ts.map +1 -0
  49. package/lib/hooks/use-plugin-discovery.d.ts +23 -0
  50. package/lib/hooks/use-plugin-discovery.d.ts.map +1 -0
  51. package/lib/hooks/use-typed-extensions.d.ts +152 -0
  52. package/lib/hooks/use-typed-extensions.d.ts.map +1 -0
  53. package/lib/utils/discovery/documentation-generator.d.ts +85 -0
  54. package/lib/utils/discovery/documentation-generator.d.ts.map +1 -0
  55. package/lib/utils/discovery/plugin-discovery-service.d.ts +109 -0
  56. package/lib/utils/discovery/plugin-discovery-service.d.ts.map +1 -0
  57. package/lib/utils/extension-points/define-extension-point.d.ts +58 -0
  58. package/lib/utils/extension-points/define-extension-point.d.ts.map +1 -0
  59. package/lib/utils/extension-points/example-extension-point.d.ts +67 -0
  60. package/lib/utils/extension-points/example-extension-point.d.ts.map +1 -0
  61. package/lib/utils/extension-points/extension-point-registry.d.ts +59 -0
  62. package/lib/utils/extension-points/extension-point-registry.d.ts.map +1 -0
  63. package/lib/utils/extension-points/extension-point-schema.d.ts +9 -0
  64. package/lib/utils/extension-points/extension-point-schema.d.ts.map +1 -0
  65. package/lib/utils/extension-points/extension-point-schemas.d.ts +92 -0
  66. package/lib/utils/extension-points/extension-point-schemas.d.ts.map +1 -0
  67. package/lib/utils/extension-points/extension-point-transforms.d.ts +21 -0
  68. package/lib/utils/extension-points/extension-point-transforms.d.ts.map +1 -0
  69. package/lib/utils/extension-points/extension-point-types.d.ts +162 -0
  70. package/lib/utils/extension-points/extension-point-types.d.ts.map +1 -0
  71. package/lib/utils/extension-points/extension-point-validation.d.ts +43 -0
  72. package/lib/utils/extension-points/extension-point-validation.d.ts.map +1 -0
  73. package/lib/utils/extension-points/json-extension-parser.d.ts +68 -0
  74. package/lib/utils/extension-points/json-extension-parser.d.ts.map +1 -0
  75. package/lib/utils/extension-points/type-generator.d.ts +43 -0
  76. package/lib/utils/extension-points/type-generator.d.ts.map +1 -0
  77. package/lib/utils/index.d.ts +10 -0
  78. package/lib/utils/index.d.ts.map +1 -0
  79. package/lib/utils/plugin-system/plugin-extension-manager.d.ts +15 -0
  80. package/lib/utils/plugin-system/plugin-extension-manager.d.ts.map +1 -0
  81. package/lib/utils/plugin-system/plugin-extension-registry-init.d.ts +2 -0
  82. package/lib/utils/plugin-system/plugin-extension-registry-init.d.ts.map +1 -0
  83. package/lib/utils/plugin-system/plugin-extension-registry.d.ts +6 -0
  84. package/lib/utils/plugin-system/plugin-extension-registry.d.ts.map +1 -0
  85. package/lib/utils/plugin-system/plugin-reducer.d.ts +17 -0
  86. package/lib/utils/plugin-system/plugin-reducer.d.ts.map +1 -0
  87. package/lib/utils/plugin-system/resolve-best-extension.d.ts +12 -0
  88. package/lib/utils/plugin-system/resolve-best-extension.d.ts.map +1 -0
  89. package/lib/utils/processors/contribution-reducer.d.ts +5 -0
  90. package/lib/utils/processors/contribution-reducer.d.ts.map +1 -0
  91. package/lib/utils/processors/initialize-plugins.d.ts +82 -0
  92. package/lib/utils/processors/initialize-plugins.d.ts.map +1 -0
  93. package/lib/utils/processors/initialize-simplified-extensions.d.ts +13 -0
  94. package/lib/utils/processors/initialize-simplified-extensions.d.ts.map +1 -0
  95. package/lib/utils/processors/process-kos-config.d.ts +34 -0
  96. package/lib/utils/processors/process-kos-config.d.ts.map +1 -0
  97. package/lib/utils/processors/simplified-contribution-processor.d.ts +14 -0
  98. package/lib/utils/processors/simplified-contribution-processor.d.ts.map +1 -0
  99. package/lib/webpack/index.d.ts +2 -0
  100. package/lib/webpack/index.d.ts.map +1 -0
  101. package/lib/webpack/with-kos-config.d.ts +2 -0
  102. package/lib/webpack/with-kos-config.d.ts.map +1 -0
  103. package/package.json +30 -0
  104. package/types/global.d.ts +53 -0
  105. package/types/plugins.d.ts +41 -0
  106. package/utils.cjs +2 -0
  107. package/utils.cjs.map +1 -0
  108. package/utils.js +296 -0
  109. package/utils.js.map +1 -0
  110. package/webpack.cjs +13 -0
  111. package/webpack.cjs.map +1 -0
  112. package/webpack.js +795 -0
  113. package/webpack.js.map +1 -0
@@ -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"}
@@ -0,0 +1,68 @@
1
+ import { ExtensionPointConfig } from './extension-point-types';
2
+
3
+ /**
4
+ * JSON representation of an extension point definition
5
+ */
6
+ export interface JsonExtensionPointDefinition {
7
+ id: string;
8
+ displayName?: string;
9
+ description?: string;
10
+ contributionKey: string;
11
+ hasView?: boolean;
12
+ isRankable?: boolean;
13
+ relatedPoints?: Record<string, string>;
14
+ schema?: JsonContributionSchema;
15
+ validation?: JsonValidationRules;
16
+ transform?: JsonTransformOperations;
17
+ metadata?: JsonExtensionPointMetadata;
18
+ }
19
+ interface JsonContributionSchema {
20
+ type?: string;
21
+ properties?: Record<string, unknown>;
22
+ required?: string[];
23
+ additionalProperties?: boolean;
24
+ }
25
+ interface JsonValidationRules {
26
+ rules?: JsonValidationRule[];
27
+ module?: string;
28
+ }
29
+ interface JsonValidationRule {
30
+ type: "required" | "range" | "pattern" | "custom" | "dependency";
31
+ field?: string;
32
+ min?: number;
33
+ max?: number;
34
+ pattern?: string;
35
+ message?: string;
36
+ dependsOn?: string;
37
+ expression?: string;
38
+ }
39
+ interface JsonTransformOperations {
40
+ addFields?: Record<string, unknown>;
41
+ removeFields?: string[];
42
+ renameFields?: Record<string, string>;
43
+ normalizeFields?: Array<{
44
+ field: string;
45
+ operation: "trim" | "lowercase" | "uppercase" | "camelCase" | "kebabCase";
46
+ }>;
47
+ module?: string;
48
+ }
49
+ interface JsonExtensionPointMetadata {
50
+ category?: string;
51
+ tags?: string[];
52
+ owner?: string;
53
+ since?: string;
54
+ deprecated?: boolean;
55
+ deprecatedSince?: string;
56
+ replacedBy?: string;
57
+ exportName?: string;
58
+ }
59
+ /**
60
+ * Parse a JSON extension point definition into an ExtensionPointConfig
61
+ */
62
+ export declare function parseJsonExtensionPoint<TData = any, TProcessed = TData>(jsonDef: JsonExtensionPointDefinition): ExtensionPointConfig<TData, TProcessed>;
63
+ /**
64
+ * Parse all extension points from a .kos.json configuration
65
+ */
66
+ export declare function parseExtensionPointsFromConfig(kosConfig: Record<string, unknown>): Array<ExtensionPointConfig<unknown, unknown>>;
67
+ export {};
68
+ //# sourceMappingURL=json-extension-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-extension-parser.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/json-extension-parser.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,oBAAoB,EAGrB,MAAM,yBAAyB,CAAC;AAGjC;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,QAAQ,CAAC,EAAE,0BAA0B,CAAC;CACvC;AAED,UAAU,sBAAsB;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;IACjE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,uBAAuB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;KAC3E,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,0BAA0B;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAYD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,KAAK,EACrE,OAAO,EAAE,4BAA4B,GACpC,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,CAwCzC;AA0bD;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACjC,KAAK,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAiB/C"}
@@ -0,0 +1,43 @@
1
+ import { JsonExtensionPointDefinition } from './json-extension-parser';
2
+
3
+ /**
4
+ * Generated TypeScript interface information
5
+ */
6
+ export interface GeneratedTypeInfo {
7
+ interfaceName: string;
8
+ exportName: string;
9
+ properties: PropertyInfo[];
10
+ imports?: string[];
11
+ }
12
+ interface PropertyInfo {
13
+ name: string;
14
+ type: string;
15
+ optional?: boolean;
16
+ description?: string;
17
+ }
18
+ /**
19
+ * Generate TypeScript interface from JSON extension point schema
20
+ */
21
+ export declare function generateTypeFromJsonSchema(extensionPoint: JsonExtensionPointDefinition): GeneratedTypeInfo;
22
+ /**
23
+ * Generate complete TypeScript definition file content
24
+ */
25
+ export declare function generateTypeDefinitionFile(extensionPoints: JsonExtensionPointDefinition[]): string;
26
+ /**
27
+ * Generate TypeScript definitions for a specific .kos.json file
28
+ */
29
+ export declare function generateTypesForKosConfig(kosConfig: Record<string, unknown>, packageName?: string): string;
30
+ /**
31
+ * CLI function to generate types from .kos.json file
32
+ */
33
+ export declare function generateTypesFromFile(kosJsonPath: string, outputPath?: string): Promise<string>;
34
+ /**
35
+ * Batch generate types for multiple .kos.json files in a workspace
36
+ */
37
+ export declare function generateTypesForWorkspace(workspaceRoot: string, outputDir?: string): Promise<Array<{
38
+ package: string;
39
+ outputPath: string;
40
+ success: boolean;
41
+ }>>;
42
+ export {};
43
+ //# sourceMappingURL=type-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-generator.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/extension-points/type-generator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,4BAA4B,GAC3C,iBAAiB,CAkCnB;AAsFD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,4BAA4B,EAAE,GAC9C,MAAM,CAiDR;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CAkBR;AAkBD;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,CAgB3E"}
@@ -0,0 +1,10 @@
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';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAGvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAG3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { PluginExtension, PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
2
+ import { DynamicRemotes } from '../../../types/global';
3
+
4
+ interface PluginsType {
5
+ remotes?: DynamicRemotes;
6
+ extensions?: PluginExtensionsType;
7
+ extensionPoints?: Record<string, PluginExtension[]>;
8
+ getExtensions: (extensionPointId: string) => PluginExtension[];
9
+ }
10
+ export declare function initPluginManager(remotesOverride?: DynamicRemotes): Promise<PluginsType>;
11
+ export declare function getContributions(remotes?: DynamicRemotes): ProcessedContributions;
12
+ export declare function loadExtensions(remotes?: DynamicRemotes): Promise<PluginExtensionsType>;
13
+ export declare function getExtensions(extensionPointId: string): Promise<PluginExtension[]>;
14
+ export {};
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;AAOhC,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,iCA0E5D;AAED,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,MAAM,8BAG3D"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=plugin-extension-registry-init.d.ts.map
@@ -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"}
@@ -0,0 +1,6 @@
1
+ import { PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
2
+
3
+ export type ExtensionReducer = (extensions: PluginExtensionsType, contributions: ProcessedContributions, experiences: any) => PluginExtensionsType;
4
+ export declare function registerExtensionReducer(reducer: ExtensionReducer): void;
5
+ export declare function applyExtensionReducers(base: PluginExtensionsType, contributions: ProcessedContributions, experiences: any): PluginExtensionsType;
6
+ //# sourceMappingURL=plugin-extension-registry.d.ts.map
@@ -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"}
@@ -0,0 +1,17 @@
1
+ import { PluginExtensionsType, ProcessedContributions } from '../../../types/plugins';
2
+
3
+ export declare const EXTENSION_POINT_SETUP_DEF = "ddk.setup";
4
+ export declare const EXTENSION_POINT_SETUP_VIEW = "ddk.setup.view";
5
+ export declare const EXTENSION_POINT_SETUP = "ddk.ncui.setup.config";
6
+ interface PluginReducer {
7
+ contributionKey: string;
8
+ basePluginType: string;
9
+ keys: {
10
+ EXTENSION_POINT_DEF?: string;
11
+ EXTENSION_POINT_VIEW?: string;
12
+ EXTENSION_POINT: string;
13
+ };
14
+ }
15
+ export declare const pluginReducer: ({ contributionKey, basePluginType, keys: { EXTENSION_POINT, EXTENSION_POINT_DEF, EXTENSION_POINT_VIEW }, }: PluginReducer) => (experiences: ProcessedContributions["experiences"], contributions: ProcessedContributions) => (acc: PluginExtensionsType, key: string) => PluginExtensionsType;
16
+ export {};
17
+ //# sourceMappingURL=plugin-reducer.d.ts.map
@@ -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,12 @@
1
+ import { PluginExtension } from '../../../types/plugins';
2
+
3
+ /**
4
+ * Resolves the best plugin extension for a given extension point.
5
+ *
6
+ * @param extensions A map of plugin extensions keyed by module/plugin ID
7
+ * @param module Optional module ID to resolve
8
+ * @param exact If true, only returns a plugin if the given `module` matches exactly. If false (default), falls back to the best-ranked plugin if no match is found.
9
+ * @returns The resolved PluginExtension or null
10
+ */
11
+ export declare function resolveBestExtension<T extends PluginExtension>(extensions: Record<string, T> | undefined, module?: string, exact?: boolean): T | null;
12
+ //# sourceMappingURL=resolve-best-extension.d.ts.map
@@ -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"}
@@ -0,0 +1,82 @@
1
+ import { PluginExtension, PluginExtensionsType } from '../../../types/plugins';
2
+ import { Contributions, DynamicRemotes } from '../../../types/global';
3
+
4
+ declare interface KosPluginsType {
5
+ __dynamicRemotes: DynamicRemotes;
6
+ __extensions?: PluginExtensionsType;
7
+ extensions?: Record<string, PluginExtension[]>;
8
+ }
9
+ declare global {
10
+ interface Window {
11
+ KosPlugins: KosPluginsType;
12
+ }
13
+ }
14
+ export interface Extensions {
15
+ extensionPointId: string;
16
+ id: string;
17
+ component: string;
18
+ }
19
+ export interface Descriptor {
20
+ id: string;
21
+ baseUrl: string;
22
+ descriptor: {
23
+ id: string;
24
+ extensions: Extensions[];
25
+ contributes: Contributions;
26
+ };
27
+ }
28
+ interface KosPluginsProps {
29
+ pluginBaseUrl?: string;
30
+ pluginApiPath?: string;
31
+ pluginContext?: {
32
+ context?: string | string[];
33
+ group?: string;
34
+ };
35
+ overrides?: Record<string, string>;
36
+ }
37
+ /**
38
+ * Parses the query string from the URL or a provided string and returns an object
39
+ * representing the key-value pairs in the query string.
40
+ *
41
+ * @param query - An optional query string to parse. If not provided, the function
42
+ * will use the current window's `location.search` string.
43
+ * The query string should not include the leading "?" character.
44
+ *
45
+ * @returns An object where each key is a parameter name from the query string,
46
+ * and each value is the corresponding decoded parameter value.
47
+ *
48
+ * @example
49
+ * // Assuming the URL is: https://example.com/?name=John&age=30
50
+ * getQueryParams();
51
+ * // Returns: { name: "John", age: "30" }
52
+ *
53
+ * @example
54
+ * getQueryParams("foo=bar&baz=qux");
55
+ * // Returns: { foo: "bar", baz: "qux" }
56
+ */
57
+ export declare const getQueryParams: (query?: null) => {};
58
+ /**
59
+ * Initializes KOS plugins by fetching plugin metadata and configuring dynamic remotes.
60
+ *
61
+ * @param props - Optional properties to configure the plugin initialization.
62
+ * @param props.pluginBaseUrl - The base URL for the plugins. Defaults to the result of `getDefaultHost()`.
63
+ * @param props.pluginApiPath - The API path to fetch plugin metadata. Defaults to `"/api/app/kosdev.ddk/ncui/plugins"`.
64
+ * @param props.overrides - An object containing overrides for plugin base URLs, keyed by plugin ID.
65
+ * @param props.pluginContext - An optional context object that specifies the plugin context and group.
66
+ * If provided, the function will fetch plugins from the UI plugins endpoint. Otherwise,
67
+ * it will fetch from the DDK pluging endpoint.
68
+ *
69
+ * @returns A promise that resolves to a record of remote definitions, where the keys are remote IDs
70
+ * and the values are the corresponding base paths for the remote entries.
71
+ *
72
+ * @remarks
73
+ * - This function fetches plugin metadata from the specified API endpoint and processes the data
74
+ * to configure dynamic remotes for the KOS plugin system.
75
+ * - If a plugin does not have a descriptor, an error is logged to the console.
76
+ * - The remote definitions are also set using the `setRemoteDefinitions` function.
77
+ *
78
+ * @throws Will throw an error if the fetch request fails or if the response cannot be parsed as JSON.
79
+ */
80
+ export declare const initializeKosPlugins: (props?: KosPluginsProps) => Promise<Record<string, string>>;
81
+ export {};
82
+ //# sourceMappingURL=initialize-plugins.d.ts.map
@@ -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,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,oCA4FjE,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,34 @@
1
+ import { Contributions } from '../../../types/global';
2
+
3
+ interface KosPluginConfig {
4
+ id: string;
5
+ init?: boolean;
6
+ contributes: Contributions;
7
+ }
8
+ interface DDKConfig {
9
+ name: string;
10
+ kosdev: {
11
+ ddk: {
12
+ ncui: {
13
+ plugin: KosPluginConfig;
14
+ };
15
+ };
16
+ };
17
+ }
18
+ interface CoreKosConfig {
19
+ name: string;
20
+ kos: {
21
+ ui: {
22
+ plugin: KosPluginConfig;
23
+ };
24
+ };
25
+ }
26
+ export type KosConfig = DDKConfig | CoreKosConfig;
27
+ export interface PluginOptions {
28
+ sdkVersion?: string;
29
+ ddkVersion?: string;
30
+ pluginPath?: string;
31
+ }
32
+ export declare function generatePluginConfiguration(config: KosConfig, options?: PluginOptions): any;
33
+ export {};
34
+ //# sourceMappingURL=process-kos-config.d.ts.map
@@ -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"}
@@ -0,0 +1,14 @@
1
+ import { ProcessedContributions } from '../../../types/plugins';
2
+ import { DynamicRemotes } from '../../../types/global';
3
+
4
+ /**
5
+ * Process contributions for simplified extension points
6
+ * This is called as part of the contribution reduction pipeline
7
+ */
8
+ export declare function processSimplifiedContributions(remotes: DynamicRemotes, acc: ProcessedContributions): ProcessedContributions;
9
+ /**
10
+ * Hook to be called from the main contribution reducer
11
+ * This ensures simplified extension points are processed alongside legacy ones
12
+ */
13
+ export declare function integrateSimplifiedContributions(originalReducer: (remotes: DynamicRemotes) => (acc: ProcessedContributions, key: string) => ProcessedContributions): (remotes: DynamicRemotes) => (acc: ProcessedContributions, key: string) => ProcessedContributions;
14
+ //# sourceMappingURL=simplified-contribution-processor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simplified-contribution-processor.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-plugin/src/lib/utils/processors/simplified-contribution-processor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGrE;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,cAAc,EACvB,GAAG,EAAE,sBAAsB,GAC1B,sBAAsB,CAiDxB;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,eAAe,EAAE,CACf,OAAO,EAAE,cAAc,KACpB,CAAC,GAAG,EAAE,sBAAsB,EAAE,GAAG,EAAE,MAAM,KAAK,sBAAsB,aAExD,cAAc,WAGhB,sBAAsB,OAAO,MAAM,4BAanD"}
@@ -0,0 +1,2 @@
1
+ export * from './with-kos-config';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/webpack/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const withKosConfig: (webpack: any) => (config: any) => any;
2
+ //# sourceMappingURL=with-kos-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-kos-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-plugin/src/lib/webpack/with-kos-config.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,wCAczB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@kosdev-code/kos-ui-plugin",
3
+ "version": "0.1.0-dev.5053",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "import": "./index.js",
8
+ "types": "./index.d.ts",
9
+ "require": "./index.cjs"
10
+ },
11
+ "./utilities": {
12
+ "import": "./utils.js",
13
+ "types": "./lib/utils/index.d.ts",
14
+ "require": "./utils.cjs"
15
+ },
16
+ "./webpack": {
17
+ "import": "./webpack.js",
18
+ "types": "./lib/webpack/index.d.ts",
19
+ "require": "./webpack.cjs"
20
+ }
21
+ },
22
+ "kos": {
23
+ "build": {
24
+ "gitHash": "c98a36c0d6454b4648b4e9d014b0e57fcd1d39a1"
25
+ }
26
+ },
27
+ "publishConfig": {
28
+ "registry": "https://npm.pkg.github.com/"
29
+ }
30
+ }
@@ -0,0 +1,53 @@
1
+ export interface ViewContribution {
2
+ id: string;
3
+ component: string;
4
+ title: string;
5
+ location: string;
6
+ }
7
+
8
+ export interface Extensions {
9
+ id: string;
10
+ displayName?: string;
11
+ description?: string;
12
+ contributionKey?: string;
13
+ hasView?: boolean;
14
+ isRankable?: boolean;
15
+ schema?: Record<string, unknown>;
16
+ validation?: Record<string, unknown>;
17
+ transform?: Record<string, unknown>;
18
+ metadata?: Record<string, unknown>;
19
+ }
20
+
21
+ export interface BaseDefinition {
22
+ id: string;
23
+ title: string;
24
+ namespace: string;
25
+ }
26
+
27
+ export interface ExperienceAware {
28
+ experienceId: string;
29
+ }
30
+
31
+ export type BaseViewDefinition = BaseDefinition & ExperienceAware;
32
+
33
+ export interface Contributions {
34
+ views: {
35
+ [key: string]: ViewContribution[];
36
+ };
37
+ experiences: {
38
+ [key: string]: ViewContribution;
39
+ };
40
+ }
41
+
42
+ export interface DynamicRemote {
43
+ basePath: string;
44
+ remote: string;
45
+ section?: string;
46
+ extensions: Extensions[];
47
+ contributes: Contributions;
48
+ init?: boolean;
49
+ config?: Record<string, unknown>;
50
+ }
51
+ export interface DynamicRemotes {
52
+ [key: string]: DynamicRemote;
53
+ }
@@ -0,0 +1,41 @@
1
+ export interface BasePluginExtension<TData = unknown> {
2
+ type: string;
3
+ component?: string;
4
+ remote?: string;
5
+ sectionId?: string;
6
+ rank?: number;
7
+ size?: {
8
+ width: string;
9
+ height: string;
10
+ };
11
+ id: string;
12
+ data: TData;
13
+ }
14
+
15
+ export interface BaseViewPluginExtension<TData = unknown>
16
+ extends BasePluginExtension<TData> {
17
+ view: BaseViewContribution;
18
+ }
19
+
20
+ export type PluginExtension<TData = unknown> = BasePluginExtension<TData>;
21
+
22
+ export interface PluginExtensionsType {
23
+ [k: string]: {
24
+ [k: string]: PluginExtension<unknown>;
25
+ };
26
+ }
27
+
28
+ export interface BaseContribution {
29
+ id: string;
30
+ remote: string;
31
+ sectionId: string;
32
+ }
33
+
34
+ export type ProcessedExperience = ViewContribution & BaseContribution;
35
+
36
+ export type ProcessedControlPourDefinition = ControlPourDefinition &
37
+ BaseContribution;
38
+ export type ProcessedContributions = {
39
+ controlPourDefinitions: Record<string, ProcessedControlPourDefinition>;
40
+ experiences: Record<string, ProcessedExperience>;
41
+ };
package/utils.cjs ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./documentation-generator-DFaIDo0E.cjs");require("zod");function m(n,e,...t){return[n,e,...t].filter(Boolean).join(".")}function V(n){const e=n.match(/^(\d+)\.(\d+)\.\d+(?:-\S+)?$/);if(!e)throw new Error(`Invalid version format: ${n}`);const[t,s,l]=e;return`${s}.${l}.0`}function h(n,e){var c,u;e!=null&&e.sdkVersion&&console.log("sdkVersion",e.sdkVersion),e!=null&&e.ddkVersion&&console.log("ddkVersion",e.ddkVersion);const t=V((e==null?void 0:e.sdkVersion)||"0.2.0"),s=V((e==null?void 0:e.ddkVersion)||"0.2.0");console.log(`Using DDK version: ${s}`),console.log(`Using SDK version: ${t}`);const l=n==null?void 0:n.name;if(!l)throw new Error("KOS Configuration should be added. Project name not found in config");const i=((e==null?void 0:e.pluginPath)||"kos.ui.plugin").split(".").reduce((a,o)=>(console.log(`Accessing key: ${o}`),a&&a[o]?a[o]:void 0),n),g=i==null?void 0:i.id;if(!g)throw new Error("KOS Configuration should be added. Plugin ID not found in config");const d=Object.keys(((c=i==null?void 0:i.contributes)==null?void 0:c.views)||{}).reduce((a,o)=>(i.contributes.views[o].forEach(f=>{a[`./${f.component}`]=f.location}),a),{});return Object.values(((u=i==null?void 0:i.contributes)==null?void 0:u.experiences)||{}).forEach(a=>{d[`./${a.component}`]=a.location}),i!=null&&i.init&&(d["./InitPlugin"]="./src/app/init.ts"),{name:l,exposes:d,library:{type:"var",name:g},additionalShared:[{libraryName:"@kosdev-code/kos-ui-plugin",sharedConfig:{singleton:!0,eager:!1,requiredVersion:`~${s}`}},{libraryName:"react",sharedConfig:{singleton:!0,eager:!1,strictVersion:!0,requiredVersion:"18.2.0"}},{libraryName:"react-dom",sharedConfig:{singleton:!0,eager:!1,strictVersion:!0,requiredVersion:"18.2.0"}},{libraryName:"@kosdev-code/kos-ui-sdk",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${t}`}},{libraryName:"@kosdev-code/kos-dispense-sdk",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${t}`}},{libraryName:"@kosdev-code/kos-freestyle-sdk",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${t}`}},{libraryName:"@kosdev-code/kos-ddk-components",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${s}`}},{libraryName:"@kosdev-code/kos-ddk-model-components",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${s}`}},{libraryName:"@kosdev-code/kos-ddk-models",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${s}`}},{libraryName:"@kosdev-code/kos-ddk",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${s}`}},{libraryName:"@kosdev-code/kos-ddk-styles",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:`~${s}`}},{libraryName:"@emotion/styled",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"~11.11.0"}},{libraryName:"@emotion/react",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"~11.11.0"}},{libraryName:"reflect-metadata",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^0.2.2"}},{libraryName:"mobx",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^6.9.0"}},{libraryName:"loglevel",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^1.8.1"}},{libraryName:"robot3",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^0.4.0"}},{libraryName:"mobx-react-lite",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^3.4.3"}},{libraryName:"react-router-dom",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^6.11.2"}},{libraryName:"date-fns",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^2.30.0"}},{libraryName:"@use-gesture/react",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^10.3.0"}},{libraryName:"@react-spring/web",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^9.7.3"}},{libraryName:"react-simple-keyboard",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^3.6.13"}},{libraryName:"expr-eval",sharedConfig:{singleton:!0,eager:!1,strictVersion:!1,requiredVersion:"^2.0.2"}},{libraryName:"zod",sharedConfig:{singleton:!0,eager:!0,strictVersion:!1,requiredVersion:"^3.25.0"}}]}}exports.BaseViewExtensionSchema=r.BaseViewExtensionSchema;exports.DocumentationGenerator=r.DocumentationGenerator;exports.PluginDiscoveryService=r.PluginDiscoveryService;exports.RankableViewExtensionSchema=r.RankableViewExtensionSchema;exports.contributionReducer=r.contributionReducer;exports.createExtensionSchema=r.createExtensionSchema;exports.createViewAwareTransform=r.createViewAwareTransform;exports.defineExtensionPoint=r.defineExtensionPoint;exports.getContributions=r.getContributions;exports.getExtensionPointRegistry=r.getExtensionPointRegistry;exports.getExtensionPointSchema=r.getExtensionPointSchema;exports.getExtensions=r.getExtensions;exports.getValidationResults=r.getValidationResults;exports.initPluginManager=r.initPluginManager;exports.initializeKosPlugins=r.initializeKosPlugins;exports.loadExtensions=r.loadExtensions;exports.registry=r.registry;exports.resolveBestExtension=r.resolveBestExtension;exports.validateDescriptorFormat=r.validateDescriptorFormat;exports.validateRank=r.validateRank;exports.validateRankIfPresent=r.validateRankIfPresent;exports.validateWithSchema=r.validateWithSchema;exports.extensionPointId=m;exports.generatePluginConfiguration=h;
2
+ //# sourceMappingURL=utils.cjs.map