@fgv/ts-res-ui-components 5.0.0-30 → 5.0.0-31

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 (45) hide show
  1. package/dist/ts-res-ui-components.d.ts +214 -117
  2. package/lib/components/common/AppHeader.d.ts +15 -0
  3. package/lib/components/common/AppHeader.js +17 -0
  4. package/lib/components/common/AppLayout.d.ts +21 -0
  5. package/lib/components/common/AppLayout.js +20 -0
  6. package/lib/components/common/AppSidebar.d.ts +22 -0
  7. package/lib/components/common/AppSidebar.js +24 -0
  8. package/lib/components/common/NavigationWarningModal.d.ts +15 -0
  9. package/lib/components/common/NavigationWarningModal.js +22 -0
  10. package/lib/components/common/QualifierContextControl.js +46 -16
  11. package/lib/components/orchestrator/ResourceOrchestrator.js +8 -15
  12. package/lib/components/views/ImportView/index.d.ts +4 -4
  13. package/lib/components/views/ImportView/index.js +259 -240
  14. package/lib/hooks/index.d.ts +7 -0
  15. package/lib/hooks/index.js +28 -0
  16. package/lib/hooks/useNavigationWarning.d.ts +35 -0
  17. package/lib/hooks/useNavigationWarning.js +69 -0
  18. package/lib/hooks/useResolutionState.js +4 -3
  19. package/lib/hooks/useResourceData.d.ts +8 -9
  20. package/lib/hooks/useResourceData.js +21 -62
  21. package/lib/hooks/useSmartObservability.js +17 -2
  22. package/lib/hooks/useUrlParams.d.ts +10 -0
  23. package/lib/hooks/useUrlParams.js +50 -0
  24. package/lib/index.d.ts +6 -1
  25. package/lib/index.js +7 -1
  26. package/lib/namespaces/ImportTools.d.ts +10 -10
  27. package/lib/namespaces/ImportTools.js +11 -10
  28. package/lib/namespaces/TsResTools.d.ts +1 -1
  29. package/lib/namespaces/TsResTools.js +1 -1
  30. package/lib/types/index.d.ts +6 -38
  31. package/lib/types/index.js +2 -0
  32. package/lib/utils/observability/factories.d.ts +6 -0
  33. package/lib/utils/observability/factories.js +11 -1
  34. package/lib/utils/observability/implementations.d.ts +33 -4
  35. package/lib/utils/observability/implementations.js +41 -3
  36. package/lib/utils/observability/index.d.ts +3 -3
  37. package/lib/utils/observability/index.js +2 -2
  38. package/lib/utils/observability/interfaces.d.ts +24 -3
  39. package/lib/utils/tsResIntegration.d.ts +9 -25
  40. package/lib/utils/tsResIntegration.js +10 -88
  41. package/lib/utils/zipLoader/zipProcessingHelpers.d.ts +4 -4
  42. package/lib/utils/zipLoader/zipProcessingHelpers.js +4 -12
  43. package/package.json +8 -7
  44. package/lib/utils/fileProcessing.d.ts +0 -22
  45. package/lib/utils/fileProcessing.js +0 -150
@@ -1,7 +1,11 @@
1
1
  import { Bundle } from '@fgv/ts-res';
2
2
  import { Config } from '@fgv/ts-res';
3
- import { FileTree } from '@fgv/ts-utils';
3
+ import { exportAsJson } from '@fgv/ts-web-extras';
4
+ import { exportUsingFileSystemAPI } from '@fgv/ts-web-extras';
5
+ import { FileTree } from '@fgv/ts-json-base';
4
6
  import { Import } from '@fgv/ts-res';
7
+ import type { IResultReporter } from '@fgv/ts-utils';
8
+ import { IUrlConfigOptions } from '@fgv/ts-web-extras';
5
9
  import { JsonCompatible } from '@fgv/ts-json-base';
6
10
  import { JsonValue } from '@fgv/ts-json-base';
7
11
  import { Logging } from '@fgv/ts-utils';
@@ -78,6 +82,24 @@ import { Success } from '@fgv/ts-utils';
78
82
  */
79
83
  declare function analyzeFilteredResources(originalResourceIds: string[], filteredProcessedResources: IProcessedResources, originalProcessedResources: IProcessedResources): IFilterResult;
80
84
 
85
+ /**
86
+ * Generic app header component with configurable icon, title, and description
87
+ * @public
88
+ */
89
+ export declare const AppHeader: React_2.FC<IAppHeaderProps>;
90
+
91
+ /**
92
+ * Generic app layout component with header, sidebar, main content area, and messages window
93
+ * @public
94
+ */
95
+ export declare const AppLayout: <TTool = unknown>({ children, selectedTool, onToolSelect, messages, onClearMessages, header: headerComponent, sidebar: sidebarComponent }: IAppLayoutProps<TTool>) => React_2.ReactElement;
96
+
97
+ /**
98
+ * Generic app sidebar component with configurable tools list
99
+ * @public
100
+ */
101
+ export declare const AppSidebar: <TTool = unknown>({ selectedTool, onToolSelect, tools, title }: IAppSidebarProps<TTool>) => React_2.ReactElement;
102
+
81
103
  /**
82
104
  * BooleanCell component for editing boolean values with checkbox presentation.
83
105
  *
@@ -260,12 +282,6 @@ declare class ConsoleUserLogger extends Logging.LoggerBase implements IUserLogge
260
282
  protected _log(message: string, level: MessageLogLevel): Success<string | undefined>;
261
283
  }
262
284
 
263
- /**
264
- * Convert ImportedDirectory to FileTree format
265
- */
266
- /** @internal */
267
- declare function convertImportedDirectoryToFileTree(directory: IImportedDirectory, o11y?: ObservabilityTools_2.IObservabilityContext): FileTree.FileTree;
268
-
269
285
  /**
270
286
  * Creates a console-based observability context for development and debugging.
271
287
  * @param diagLogLevel - Log level for diagnostic messages.
@@ -415,6 +431,13 @@ declare function createResolverWithContext(processedResources: IProcessedResourc
415
431
  /** @internal */
416
432
  declare function createSimpleContext(qualifiers: Qualifiers.IReadOnlyQualifierCollector, values: Record<string, string | undefined>): Result<Runtime.ValidatingSimpleContextQualifierProvider>;
417
433
 
434
+ /**
435
+ * Creates a test observability context with no-op loggers and non-upgrade policy.
436
+ * @returns A new observability context configured for testing.
437
+ * @public
438
+ */
439
+ declare function createTestObservabilityContext(): IObservabilityContext;
440
+
418
441
  /**
419
442
  * Creates a timestamp string suitable for filenames
420
443
  * @public
@@ -873,12 +896,6 @@ declare const EditableJsonView: React_2.FC<IEditableJsonViewProps>;
873
896
  */
874
897
  declare function evaluateConditionsForCandidate(resolver: Runtime.ResourceResolver, candidateIndex: number, compiledResource: ResourceJson.Compiled.ICompiledResource, compiledCollection: ResourceJson.Compiled.ICompiledResourceCollection): IConditionEvaluationResult[];
875
898
 
876
- /**
877
- * Export data as JSON file
878
- */
879
- /** @internal */
880
- declare function exportAsJson(data: JsonValue, filename: string): void;
881
-
882
899
  /**
883
900
  * Export configuration to JSON string
884
901
  */
@@ -927,18 +944,6 @@ declare function exportAsJson(data: JsonValue, filename: string): void;
927
944
  */
928
945
  declare function exportConfiguration(config: Config.Model.ISystemConfiguration, options?: IConfigurationExportOptions): Result<string>;
929
946
 
930
- /**
931
- * Export data using File System Access API if available
932
- */
933
- /** @internal */
934
- declare function exportUsingFileSystemAPI(data: JsonValue, suggestedName: string, description?: string): Promise<boolean>;
935
-
936
- /**
937
- * Convert flat file list to directory structure
938
- */
939
- /** @internal */
940
- declare function filesToDirectory(files: IImportedFile[]): IImportedDirectory;
941
-
942
947
  declare namespace FilterTools {
943
948
  export {
944
949
  FilterView,
@@ -1618,6 +1623,34 @@ declare function hasPendingContextChanges(contextValues: Record<string, string |
1618
1623
  */
1619
1624
  declare const HierarchyEditor: React_2.FC<IHierarchyEditorProps>;
1620
1625
 
1626
+ declare interface IAppHeaderProps {
1627
+ icon: React_2.ComponentType<{
1628
+ className?: string;
1629
+ }>;
1630
+ title: string;
1631
+ description: string;
1632
+ }
1633
+
1634
+ declare interface IAppLayoutProps<TTool = unknown> {
1635
+ children: React_2.ReactNode;
1636
+ selectedTool: TTool;
1637
+ onToolSelect: (tool: TTool) => void;
1638
+ messages: ViewStateTools.IMessage[];
1639
+ onClearMessages: () => void;
1640
+ header: React_2.ComponentType;
1641
+ sidebar: React_2.ComponentType<{
1642
+ selectedTool: TTool;
1643
+ onToolSelect: (tool: TTool) => void;
1644
+ }>;
1645
+ }
1646
+
1647
+ declare interface IAppSidebarProps<TTool> {
1648
+ selectedTool: TTool;
1649
+ onToolSelect: (tool: TTool) => void;
1650
+ tools: IToolDefinition<TTool>[];
1651
+ title?: string;
1652
+ }
1653
+
1621
1654
  /**
1622
1655
  * Props for the BooleanCell component.
1623
1656
  */
@@ -1843,23 +1876,11 @@ declare interface ICreatePendingResourceParams<T = unknown, TV extends JsonCompa
1843
1876
  }
1844
1877
 
1845
1878
  /**
1846
- * Parameters for processImportedDirectory
1847
- */
1848
- /** @internal */
1849
- declare interface ICreateProcessImportedDirectoryParams {
1850
- directory: IImportedDirectory;
1851
- systemConfig?: Config.Model.ISystemConfiguration;
1852
- qualifierTypeFactory?: Config.IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierTypes.QualifierType>;
1853
- resourceTypeFactory?: Config.IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceTypes.ResourceType>;
1854
- o11y?: ObservabilityTools_2.IObservabilityContext;
1855
- }
1856
-
1857
- /**
1858
- * Process imported files using the ts-res system
1879
+ * Parameters for processFileTree
1859
1880
  */
1860
1881
  /** @internal */
1861
- declare interface ICreateProcessImportedFilesParams {
1862
- files: IImportedFile[];
1882
+ declare interface ICreateProcessFileTreeParams {
1883
+ fileTree: FileTree.FileTree;
1863
1884
  systemConfig?: Config.Model.ISystemConfiguration;
1864
1885
  qualifierTypeFactory?: Config.IConfigInitFactory<QualifierTypes.Config.IAnyQualifierTypeConfig, QualifierTypes.QualifierType>;
1865
1886
  resourceTypeFactory?: Config.IConfigInitFactory<ResourceTypes.Config.IResourceTypeConfig, ResourceTypes.ResourceType>;
@@ -2596,40 +2617,6 @@ declare interface IHierarchyEditorProps {
2596
2617
  className?: string;
2597
2618
  }
2598
2619
 
2599
- /**
2600
- * Represents a directory structure imported into the system.
2601
- * Supports nested directory hierarchies with files and subdirectories.
2602
- *
2603
- * @public
2604
- */
2605
- declare interface IImportedDirectory {
2606
- /** Name of the directory */
2607
- name: string;
2608
- /** Optional directory path within the import structure */
2609
- path?: string;
2610
- /** Files contained in this directory */
2611
- files: IImportedFile[];
2612
- /** Nested subdirectories */
2613
- subdirectories?: IImportedDirectory[];
2614
- }
2615
-
2616
- /**
2617
- * Represents a file imported into the system.
2618
- * Used for handling individual resource files and configurations.
2619
- *
2620
- * @public
2621
- */
2622
- declare interface IImportedFile {
2623
- /** Name of the file */
2624
- name: string;
2625
- /** Optional file path within the import structure */
2626
- path?: string;
2627
- /** Text content of the file */
2628
- content: string;
2629
- /** MIME type or file type identifier */
2630
- type?: string;
2631
- }
2632
-
2633
2620
  /**
2634
2621
  * Props for the ImportView component.
2635
2622
  * Handles importing resource configurations and bundles.
@@ -2638,11 +2625,11 @@ declare interface IImportedFile {
2638
2625
  */
2639
2626
  declare interface IImportViewProps extends IViewBaseProps {
2640
2627
  /** Callback when resource files/directories are imported */
2641
- onImport?: (data: IImportedDirectory | IImportedFile[]) => void;
2628
+ onImport?: (data: FileTree.FileTree) => void;
2642
2629
  /** Callback when a bundle file is imported */
2643
2630
  onBundleImport?: (bundle: Bundle.IBundle) => void;
2644
2631
  /** Callback when a ZIP file is imported with optional configuration */
2645
- onZipImport?: (zipData: IImportedDirectory | IImportedFile[], config?: Config.Model.ISystemConfiguration) => void;
2632
+ onZipImport?: (zipData: FileTree.FileTree, config?: Config.Model.ISystemConfiguration) => void;
2646
2633
  /** File types accepted for import */
2647
2634
  acceptedFileTypes?: string[];
2648
2635
  /** External error state to override local import status */
@@ -2756,12 +2743,8 @@ declare function importConfiguration(data: string): Result<Config.Model.ISystemC
2756
2743
  declare namespace ImportTools {
2757
2744
  export {
2758
2745
  ImportView,
2759
- readFilesFromInput,
2760
- filesToDirectory,
2761
2746
  exportAsJson,
2762
2747
  exportUsingFileSystemAPI,
2763
- IImportedFile,
2764
- IImportedDirectory,
2765
2748
  IImportViewProps
2766
2749
  }
2767
2750
  }
@@ -2788,16 +2771,16 @@ export { ImportTools }
2788
2771
  * import { ImportView } from '@fgv/ts-res-ui-components';
2789
2772
  *
2790
2773
  * function MyImportTool() {
2791
- * const handleFileImport = (files, directory) => {
2792
- * console.log('Importing files:', files, directory);
2774
+ * const handleFileImport = (fileTree) => {
2775
+ * console.log('Importing files:', fileTree);
2793
2776
  * };
2794
2777
  *
2795
2778
  * const handleBundleImport = (bundle) => {
2796
2779
  * console.log('Importing bundle:', bundle);
2797
2780
  * };
2798
2781
  *
2799
- * const handleZipImport = (zipData) => {
2800
- * console.log('Importing ZIP:', zipData);
2782
+ * const handleZipImport = (zipData, config) => {
2783
+ * console.log('Importing ZIP:', zipData, config);
2801
2784
  * };
2802
2785
  *
2803
2786
  * return (
@@ -2846,6 +2829,33 @@ declare interface IMultiGridViewProps extends IViewBaseProps {
2846
2829
  allowGridReordering?: boolean;
2847
2830
  }
2848
2831
 
2832
+ /**
2833
+ * @public
2834
+ */
2835
+ export declare interface INavigationWarningActions<T = unknown> {
2836
+ setHasUnsavedChanges: (hasChanges: boolean) => void;
2837
+ showWarning: (pendingTool: T) => void;
2838
+ hideWarning: () => void;
2839
+ confirmNavigation: () => T | null;
2840
+ }
2841
+
2842
+ declare interface INavigationWarningModalProps {
2843
+ isOpen: boolean;
2844
+ onCancel: () => void;
2845
+ onConfirm: () => void;
2846
+ onSave?: () => void;
2847
+ hasUnsavedChanges: boolean;
2848
+ }
2849
+
2850
+ /**
2851
+ * @public
2852
+ */
2853
+ export declare interface INavigationWarningState<T = unknown> {
2854
+ isWarningOpen: boolean;
2855
+ pendingTool: T | null;
2856
+ hasUnsavedChanges: boolean;
2857
+ }
2858
+
2849
2859
  /**
2850
2860
  * Observability context that provides both diagnostic and user logging capabilities.
2851
2861
  * @public
@@ -2854,11 +2864,27 @@ declare interface IObservabilityContext {
2854
2864
  /**
2855
2865
  * Diagnostic logger for internal system diagnostics.
2856
2866
  */
2857
- readonly diag: Logging.ILogger;
2867
+ readonly diag: Logging.LogReporter<unknown>;
2858
2868
  /**
2859
2869
  * User logger for user-facing messages and feedback.
2860
2870
  */
2861
- readonly user: IUserLogger;
2871
+ readonly user: IUserLogReporter;
2872
+ /**
2873
+ * Optional policy configuration for context behavior.
2874
+ */
2875
+ readonly policy?: IObservabilityPolicy;
2876
+ }
2877
+
2878
+ /**
2879
+ * Policy configuration for observability context behavior.
2880
+ * @public
2881
+ */
2882
+ declare interface IObservabilityPolicy {
2883
+ /**
2884
+ * If true, prevents automatic upgrade of the context (e.g., in tests).
2885
+ * Default (undefined or false) allows upgrade.
2886
+ */
2887
+ doNotUpgrade?: boolean;
2862
2888
  }
2863
2889
 
2864
2890
  /**
@@ -2978,9 +3004,8 @@ export declare interface IObservabilityProviderProps {
2978
3004
  * @public
2979
3005
  */
2980
3006
  export declare interface IOrchestratorActions {
2981
- importDirectory: (directory: IImportedDirectory) => Promise<void>;
2982
- importDirectoryWithConfig: (directory: IImportedDirectory, config: Config.Model.ISystemConfiguration) => Promise<void>;
2983
- importFiles: (files: IImportedFile[]) => Promise<void>;
3007
+ importFileTree: (fileTree: FileTree.FileTree) => Promise<void>;
3008
+ importFileTreeWithConfig: (fileTree: FileTree.FileTree, config: Config.Model.ISystemConfiguration) => Promise<void>;
2984
3009
  importBundle: (bundle: Bundle.IBundle) => Promise<void>;
2985
3010
  clearResources: () => void;
2986
3011
  updateConfiguration: (config: Config.Model.ISystemConfiguration) => void;
@@ -4227,6 +4252,15 @@ declare function isViewStateConnected(context: IObservabilityContext): boolean;
4227
4252
  */
4228
4253
  declare function isZipFile(filename: string): boolean;
4229
4254
 
4255
+ declare interface IToolDefinition<TTool> {
4256
+ id: TTool;
4257
+ name: string;
4258
+ icon: React_2.ComponentType<{
4259
+ className?: string;
4260
+ }>;
4261
+ description: string;
4262
+ }
4263
+
4230
4264
  /**
4231
4265
  * Props for the TriStateCell component.
4232
4266
  */
@@ -4342,12 +4376,10 @@ declare interface IUseResourceDataReturn {
4342
4376
  state: IResourceManagerState;
4343
4377
  /** Available actions for processing and managing resources */
4344
4378
  actions: {
4345
- /** Process an imported directory structure into a resource system */
4346
- processDirectory: (directory: IImportedDirectory) => Promise<Result<void>>;
4347
- /** Process a directory with an explicit configuration */
4348
- processDirectoryWithConfig: (directory: IImportedDirectory, config: Config.Model.ISystemConfiguration) => Promise<Result<void>>;
4349
- /** Process an array of imported files into a resource system */
4350
- processFiles: (files: IImportedFile[]) => Promise<Result<void>>;
4379
+ /** Process a FileTree into a resource system */
4380
+ processFileTree: (fileTree: FileTree.FileTree) => Promise<Result<void>>;
4381
+ /** Process a FileTree with an explicit configuration */
4382
+ processFileTreeWithConfig: (fileTree: FileTree.FileTree, config: Config.Model.ISystemConfiguration) => Promise<Result<void>>;
4351
4383
  /** Process a pre-compiled bundle file */
4352
4384
  processBundleFile: (bundle: Bundle.IBundle) => Promise<void>;
4353
4385
  /** Clear any current error state */
@@ -4378,6 +4410,13 @@ declare interface IUserLogger extends Logging.ILogger {
4378
4410
  success(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
4379
4411
  }
4380
4412
 
4413
+ /**
4414
+ * User log reporter interface that combines IUserLogger with IResultReporter.
4415
+ * @public
4416
+ */
4417
+ declare interface IUserLogReporter extends IUserLogger, IResultReporter<unknown> {
4418
+ }
4419
+
4381
4420
  /**
4382
4421
  * Return type for the useViewState hook.
4383
4422
  *
@@ -4576,6 +4615,24 @@ export declare const MessagesWindow: React_2.FC<IMessagesWindowProps>;
4576
4615
  */
4577
4616
  export declare const MultiGridView: React_2.FC<IMultiGridViewProps>;
4578
4617
 
4618
+ /**
4619
+ * @deprecated Use INavigationWarningActions instead
4620
+ * @public
4621
+ */
4622
+ export declare type NavigationWarningActions<T = unknown> = INavigationWarningActions<T>;
4623
+
4624
+ /**
4625
+ * Modal component for warning users about unsaved changes before navigation
4626
+ * @public
4627
+ */
4628
+ export declare const NavigationWarningModal: React_2.FC<INavigationWarningModalProps>;
4629
+
4630
+ /**
4631
+ * @deprecated Use INavigationWarningState instead
4632
+ * @public
4633
+ */
4634
+ export declare type NavigationWarningState<T = unknown> = INavigationWarningState<T>;
4635
+
4579
4636
  /**
4580
4637
  * No-op user logger that suppresses all output.
4581
4638
  * @public
@@ -4604,17 +4661,22 @@ declare class ObservabilityContext implements IObservabilityContext {
4604
4661
  /**
4605
4662
  * {@inheritDoc ObservabilityTools.IObservabilityContext.diag}
4606
4663
  */
4607
- readonly diag: Logging.ILogger;
4664
+ readonly diag: Logging.LogReporter<unknown>;
4608
4665
  /**
4609
4666
  * {@inheritDoc ObservabilityTools.IObservabilityContext.user}
4610
4667
  */
4611
- readonly user: IUserLogger;
4668
+ readonly user: IUserLogReporter;
4669
+ /**
4670
+ * {@inheritDoc ObservabilityTools.IObservabilityContext.policy}
4671
+ */
4672
+ readonly policy?: IObservabilityPolicy;
4612
4673
  /**
4613
4674
  * Creates a new observability context.
4614
4675
  * @param diag - The diagnostic logger.
4615
4676
  * @param user - The user logger.
4677
+ * @param policy - Optional policy configuration.
4616
4678
  */
4617
- constructor(diag: Logging.ILogger, user: IUserLogger);
4679
+ constructor(diag: Logging.ILogger, user: IUserLogger, policy?: IObservabilityPolicy);
4618
4680
  }
4619
4681
 
4620
4682
  /**
@@ -4679,10 +4741,13 @@ export { ObservabilityTools }
4679
4741
  declare namespace ObservabilityTools_2 {
4680
4742
  export {
4681
4743
  IUserLogger,
4744
+ IUserLogReporter,
4682
4745
  IObservabilityContext,
4746
+ IObservabilityPolicy,
4683
4747
  ConsoleUserLogger,
4684
4748
  NoOpUserLogger,
4685
4749
  ViewStateUserLogger,
4750
+ UserLogReporter,
4686
4751
  ObservabilityContext,
4687
4752
  detectObservabilityContextType,
4688
4753
  isViewStateConnected,
@@ -4690,6 +4755,7 @@ declare namespace ObservabilityTools_2 {
4690
4755
  ObservabilityContextType,
4691
4756
  createConsoleObservabilityContext,
4692
4757
  createNoOpObservabilityContext,
4758
+ createTestObservabilityContext,
4693
4759
  createViewStateObservabilityContext,
4694
4760
  DefaultObservabilityContext,
4695
4761
  TestObservabilityContext
@@ -4712,21 +4778,18 @@ declare namespace PickerTools {
4712
4778
  export { PickerTools }
4713
4779
 
4714
4780
  /**
4715
- * Process imported directory using the ts-res system
4781
+ * Process FileTree using the ts-res system
4782
+ * Unified function that replaces both processImportedFiles and processImportedDirectory
4716
4783
  */
4717
4784
  /** @internal */
4718
- declare function processImportedDirectory(params: ICreateProcessImportedDirectoryParams): Result<IExtendedProcessedResources>;
4719
-
4720
- /** @internal */
4721
- declare function processImportedFiles(params: ICreateProcessImportedFilesParams): Result<IExtendedProcessedResources>;
4785
+ declare function processFileTree(params: ICreateProcessFileTreeParams): Result<IExtendedProcessedResources>;
4722
4786
 
4723
4787
  /**
4724
4788
  * Helper function to process resources from a ZIP load result
4725
4789
  * @public
4726
4790
  */
4727
4791
  declare function processZipLoadResult(zipResult: {
4728
- files: IImportedFile[];
4729
- directory?: IImportedDirectory;
4792
+ fileTree: FileTree.FileTree;
4730
4793
  config?: Config.Model.ISystemConfiguration;
4731
4794
  }, overrideConfig?: Config.Model.ISystemConfiguration, o11y?: ObservabilityTools_2.IObservabilityContext): Promise<Result<IProcessedResources>>;
4732
4795
 
@@ -4734,7 +4797,7 @@ declare function processZipLoadResult(zipResult: {
4734
4797
  * Helper function to process resources from ZIP data using ts-res-ui-components integration
4735
4798
  * @public
4736
4799
  */
4737
- declare function processZipResources(files: IImportedFile[], directory: IImportedDirectory | undefined, config?: Config.Model.ISystemConfiguration, o11y?: ObservabilityTools_2.IObservabilityContext): Promise<Result<IProcessedResources>>;
4800
+ declare function processZipResources(fileTree: FileTree.FileTree, config?: Config.Model.ISystemConfiguration, o11y?: ObservabilityTools_2.IObservabilityContext): Promise<Result<IProcessedResources>>;
4738
4801
 
4739
4802
  /**
4740
4803
  * A control component for managing individual qualifier context values.
@@ -5051,12 +5114,6 @@ declare const QualifierEditForm: React_2.FC<IQualifierEditFormProps>;
5051
5114
  */
5052
5115
  declare const QualifierTypeEditForm: React_2.FC<IQualifierTypeEditFormProps>;
5053
5116
 
5054
- /**
5055
- * Read files from file input element
5056
- */
5057
- /** @internal */
5058
- declare function readFilesFromInput(files: FileList): Promise<IImportedFile[]>;
5059
-
5060
5117
  /**
5061
5118
  * Reusable control for configuring ResolutionView context options.
5062
5119
  *
@@ -6205,10 +6262,8 @@ declare namespace TsResTools {
6205
6262
  CompiledView,
6206
6263
  getDefaultSystemConfiguration,
6207
6264
  createSimpleContext,
6208
- convertImportedDirectoryToFileTree,
6209
6265
  createTsResSystemFromConfig,
6210
- processImportedFiles,
6211
- processImportedDirectory,
6266
+ processFileTree,
6212
6267
  ISourceViewProps,
6213
6268
  ICompiledViewProps
6214
6269
  }
@@ -6351,6 +6406,14 @@ declare function useFilterState(initialState?: Partial<IFilterState>): IUseFilte
6351
6406
  */
6352
6407
  declare function useIConfigurationState(initialConfiguration?: Config.Model.ISystemConfiguration, onConfigurationChange?: (config: Config.Model.ISystemConfiguration) => void, onUnsavedChanges?: (hasChanges: boolean) => void): IUseIConfigurationStateReturn;
6353
6408
 
6409
+ /**
6410
+ * @public
6411
+ */
6412
+ export declare const useNavigationWarning: <T = unknown>() => {
6413
+ state: INavigationWarningState<T>;
6414
+ actions: INavigationWarningActions<T>;
6415
+ };
6416
+
6354
6417
  /**
6355
6418
  * Hook to access the current observability context.
6356
6419
  *
@@ -6466,8 +6529,8 @@ declare function useResolutionState(processedResources: IProcessedResources | nu
6466
6529
  * ```typescript
6467
6530
  * const { state, actions } = useResourceData();
6468
6531
  *
6469
- * // Process imported files
6470
- * await actions.processFiles(importedFiles);
6532
+ * // Process a FileTree
6533
+ * await actions.processFileTree(fileTree);
6471
6534
  *
6472
6535
  * // Resolve a resource with context
6473
6536
  * const result = await actions.resolveResource('my.resource', {
@@ -6489,6 +6552,31 @@ declare function useResolutionState(processedResources: IProcessedResources | nu
6489
6552
  */
6490
6553
  declare function useResourceData(params?: IUseResourceDataParams): IUseResourceDataReturn;
6491
6554
 
6555
+ /**
6556
+ * User logger that extends LogReporter to provide Result reporting capabilities.
6557
+ * Wraps an existing IUserLogger to add IResultReporter functionality.
6558
+ * @public
6559
+ */
6560
+ declare class UserLogReporter extends Logging.LogReporter<unknown> implements IUserLogReporter {
6561
+ private readonly _userLogger;
6562
+ /**
6563
+ * Creates a new UserLogReporter.
6564
+ * @param userLogger - The user logger to wrap.
6565
+ */
6566
+ constructor(userLogger: IUserLogger);
6567
+ /**
6568
+ * {@inheritDoc ObservabilityTools.IUserLogger.success}
6569
+ */
6570
+ success(message?: unknown, ...parameters: unknown[]): Success<string | undefined>;
6571
+ /**
6572
+ * Override reportSuccess to use the success method for user-friendly reporting.
6573
+ * @param level - The log level.
6574
+ * @param value - The value to report.
6575
+ * @param detail - Optional detail.
6576
+ */
6577
+ reportSuccess(level: MessageLogLevel, value: unknown, detail?: unknown): void;
6578
+ }
6579
+
6492
6580
  /**
6493
6581
  * Smart observability hook that automatically provides the best available observability context.
6494
6582
  *
@@ -6518,6 +6606,15 @@ declare function useResourceData(params?: IUseResourceDataParams): IUseResourceD
6518
6606
  */
6519
6607
  export declare function useSmartObservability(): IObservabilityContext;
6520
6608
 
6609
+ /**
6610
+ * Hook to parse and provide URL parameters for initial app configuration
6611
+ * @public
6612
+ */
6613
+ export declare function useUrlParams(): {
6614
+ urlParams: IUrlConfigOptions;
6615
+ hasUrlParams: boolean;
6616
+ };
6617
+
6521
6618
  /**
6522
6619
  * Hook for managing view state including messages and resource selection.
6523
6620
  *
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ interface IAppHeaderProps {
3
+ icon: React.ComponentType<{
4
+ className?: string;
5
+ }>;
6
+ title: string;
7
+ description: string;
8
+ }
9
+ /**
10
+ * Generic app header component with configurable icon, title, and description
11
+ * @public
12
+ */
13
+ declare const AppHeader: React.FC<IAppHeaderProps>;
14
+ export default AppHeader;
15
+ //# sourceMappingURL=AppHeader.d.ts.map
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ /**
3
+ * Generic app header component with configurable icon, title, and description
4
+ * @public
5
+ */
6
+ const AppHeader = ({ icon: iconComponent, title, description }) => {
7
+ const Icon = iconComponent;
8
+ return (React.createElement("header", { className: "bg-white shadow-sm border-b border-gray-200" },
9
+ React.createElement("div", { className: "container mx-auto px-4 py-4" },
10
+ React.createElement("div", { className: "flex items-center space-x-3" },
11
+ React.createElement(Icon, { className: "h-8 w-8 text-blue-600" }),
12
+ React.createElement("div", null,
13
+ React.createElement("h1", { className: "text-2xl font-bold text-gray-900" }, title),
14
+ React.createElement("p", { className: "text-sm text-gray-600" }, description))))));
15
+ };
16
+ export default AppHeader;
17
+ //# sourceMappingURL=AppHeader.js.map
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { ViewStateTools } from '../../namespaces';
3
+ interface IAppLayoutProps<TTool = unknown> {
4
+ children: React.ReactNode;
5
+ selectedTool: TTool;
6
+ onToolSelect: (tool: TTool) => void;
7
+ messages: ViewStateTools.IMessage[];
8
+ onClearMessages: () => void;
9
+ header: React.ComponentType;
10
+ sidebar: React.ComponentType<{
11
+ selectedTool: TTool;
12
+ onToolSelect: (tool: TTool) => void;
13
+ }>;
14
+ }
15
+ /**
16
+ * Generic app layout component with header, sidebar, main content area, and messages window
17
+ * @public
18
+ */
19
+ declare const AppLayout: <TTool = unknown>({ children, selectedTool, onToolSelect, messages, onClearMessages, header: headerComponent, sidebar: sidebarComponent }: IAppLayoutProps<TTool>) => React.ReactElement;
20
+ export default AppLayout;
21
+ //# sourceMappingURL=AppLayout.d.ts.map
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ViewStateTools } from '../../namespaces';
3
+ /**
4
+ * Generic app layout component with header, sidebar, main content area, and messages window
5
+ * @public
6
+ */
7
+ const AppLayout = ({ children, selectedTool, onToolSelect, messages, onClearMessages, header: headerComponent, sidebar: sidebarComponent }) => {
8
+ const Header = headerComponent;
9
+ const Sidebar = sidebarComponent;
10
+ return (React.createElement("div", { className: "min-h-screen bg-gray-50" },
11
+ React.createElement(Header, null),
12
+ React.createElement("div", { className: "flex" },
13
+ React.createElement(Sidebar, { selectedTool: selectedTool, onToolSelect: onToolSelect }),
14
+ React.createElement("main", { className: "flex-1 overflow-hidden" },
15
+ React.createElement("div", { className: "h-full flex flex-col" },
16
+ React.createElement("div", { className: "flex-1 overflow-auto" }, children),
17
+ React.createElement(ViewStateTools.MessagesWindow, { messages: messages, onClearMessages: onClearMessages }))))));
18
+ };
19
+ export default AppLayout;
20
+ //# sourceMappingURL=AppLayout.js.map
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ interface IToolDefinition<TTool> {
3
+ id: TTool;
4
+ name: string;
5
+ icon: React.ComponentType<{
6
+ className?: string;
7
+ }>;
8
+ description: string;
9
+ }
10
+ interface IAppSidebarProps<TTool> {
11
+ selectedTool: TTool;
12
+ onToolSelect: (tool: TTool) => void;
13
+ tools: IToolDefinition<TTool>[];
14
+ title?: string;
15
+ }
16
+ /**
17
+ * Generic app sidebar component with configurable tools list
18
+ * @public
19
+ */
20
+ declare const AppSidebar: <TTool = unknown>({ selectedTool, onToolSelect, tools, title }: IAppSidebarProps<TTool>) => React.ReactElement;
21
+ export default AppSidebar;
22
+ //# sourceMappingURL=AppSidebar.d.ts.map