@hamak/ui-store 0.5.1
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/README.md +143 -0
- package/dist/api/api/index.d.ts +7 -0
- package/dist/api/api/index.d.ts.map +1 -0
- package/dist/api/api/index.js +6 -0
- package/dist/api/api/middleware-registry.d.ts +33 -0
- package/dist/api/api/middleware-registry.d.ts.map +1 -0
- package/dist/api/api/middleware-registry.js +5 -0
- package/dist/api/api/reducer-registry.d.ts +41 -0
- package/dist/api/api/reducer-registry.d.ts.map +1 -0
- package/dist/api/api/reducer-registry.js +5 -0
- package/dist/api/api/store-manager.d.ts +55 -0
- package/dist/api/api/store-manager.d.ts.map +1 -0
- package/dist/api/api/store-manager.js +5 -0
- package/dist/api/autosave/autosave-action-factory.d.ts +69 -0
- package/dist/api/autosave/autosave-action-factory.d.ts.map +1 -0
- package/dist/api/autosave/autosave-action-factory.js +135 -0
- package/dist/api/autosave/autosave-action-types.d.ts +134 -0
- package/dist/api/autosave/autosave-action-types.d.ts.map +1 -0
- package/dist/api/autosave/autosave-action-types.js +44 -0
- package/dist/api/autosave/autosave-types.d.ts +86 -0
- package/dist/api/autosave/autosave-types.d.ts.map +1 -0
- package/dist/api/autosave/autosave-types.js +35 -0
- package/dist/api/autosave/index.d.ts +9 -0
- package/dist/api/autosave/index.d.ts.map +1 -0
- package/dist/api/autosave/index.js +8 -0
- package/dist/api/fs/contracts/filesystem-facade.contract.d.ts +57 -0
- package/dist/api/fs/contracts/filesystem-facade.contract.d.ts.map +1 -0
- package/dist/api/fs/contracts/filesystem-facade.contract.js +1 -0
- package/dist/api/fs/contracts/filesystem-manager.contract.d.ts +42 -0
- package/dist/api/fs/contracts/filesystem-manager.contract.d.ts.map +1 -0
- package/dist/api/fs/contracts/filesystem-manager.contract.js +1 -0
- package/dist/api/fs/index.d.ts +5 -0
- package/dist/api/fs/index.d.ts.map +1 -0
- package/dist/api/fs/index.js +4 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +9 -0
- package/dist/api/tokens/index.d.ts +5 -0
- package/dist/api/tokens/index.d.ts.map +1 -0
- package/dist/api/tokens/index.js +4 -0
- package/dist/api/tokens/service-tokens.d.ts +10 -0
- package/dist/api/tokens/service-tokens.d.ts.map +1 -0
- package/dist/api/tokens/service-tokens.js +10 -0
- package/dist/api/types/extension-types.d.ts +32 -0
- package/dist/api/types/extension-types.d.ts.map +1 -0
- package/dist/api/types/extension-types.js +4 -0
- package/dist/api/types/index.d.ts +8 -0
- package/dist/api/types/index.d.ts.map +1 -0
- package/dist/api/types/index.js +7 -0
- package/dist/api/types/middleware-types.d.ts +31 -0
- package/dist/api/types/middleware-types.d.ts.map +1 -0
- package/dist/api/types/middleware-types.js +4 -0
- package/dist/api/types/reducer-types.d.ts +22 -0
- package/dist/api/types/reducer-types.d.ts.map +1 -0
- package/dist/api/types/reducer-types.js +4 -0
- package/dist/api/types/store-types.d.ts +49 -0
- package/dist/api/types/store-types.d.ts.map +1 -0
- package/dist/api/types/store-types.js +4 -0
- package/dist/impl/autosave/autosave-config-resolver.d.ts +45 -0
- package/dist/impl/autosave/autosave-config-resolver.d.ts.map +1 -0
- package/dist/impl/autosave/autosave-config-resolver.js +107 -0
- package/dist/impl/autosave/autosave-middleware.d.ts +37 -0
- package/dist/impl/autosave/autosave-middleware.d.ts.map +1 -0
- package/dist/impl/autosave/autosave-middleware.js +297 -0
- package/dist/impl/autosave/autosave-registry.d.ts +15 -0
- package/dist/impl/autosave/autosave-registry.d.ts.map +1 -0
- package/dist/impl/autosave/autosave-registry.js +38 -0
- package/dist/impl/autosave/autosave-sync-middleware.d.ts +24 -0
- package/dist/impl/autosave/autosave-sync-middleware.d.ts.map +1 -0
- package/dist/impl/autosave/autosave-sync-middleware.js +98 -0
- package/dist/impl/autosave/index.d.ts +8 -0
- package/dist/impl/autosave/index.d.ts.map +1 -0
- package/dist/impl/autosave/index.js +7 -0
- package/dist/impl/core/index.d.ts +4 -0
- package/dist/impl/core/index.d.ts.map +1 -0
- package/dist/impl/core/index.js +3 -0
- package/dist/impl/core/middleware-registry.d.ts +21 -0
- package/dist/impl/core/middleware-registry.d.ts.map +1 -0
- package/dist/impl/core/middleware-registry.js +60 -0
- package/dist/impl/core/reducer-registry.d.ts +18 -0
- package/dist/impl/core/reducer-registry.d.ts.map +1 -0
- package/dist/impl/core/reducer-registry.js +65 -0
- package/dist/impl/core/store-manager.d.ts +28 -0
- package/dist/impl/core/store-manager.d.ts.map +1 -0
- package/dist/impl/core/store-manager.js +129 -0
- package/dist/impl/extensions/store-extensions.d.ts +23 -0
- package/dist/impl/extensions/store-extensions.d.ts.map +1 -0
- package/dist/impl/extensions/store-extensions.js +66 -0
- package/dist/impl/fs/commands/fs-commands.d.ts +100 -0
- package/dist/impl/fs/commands/fs-commands.d.ts.map +1 -0
- package/dist/impl/fs/commands/fs-commands.js +338 -0
- package/dist/impl/fs/commands/structure-commands.d.ts +76 -0
- package/dist/impl/fs/commands/structure-commands.d.ts.map +1 -0
- package/dist/impl/fs/commands/structure-commands.js +21 -0
- package/dist/impl/fs/core/fs-adapter.d.ts +54 -0
- package/dist/impl/fs/core/fs-adapter.d.ts.map +1 -0
- package/dist/impl/fs/core/fs-adapter.js +204 -0
- package/dist/impl/fs/core/fs-facade.d.ts +37 -0
- package/dist/impl/fs/core/fs-facade.d.ts.map +1 -0
- package/dist/impl/fs/core/fs-facade.js +98 -0
- package/dist/impl/fs/index.d.ts +8 -0
- package/dist/impl/fs/index.d.ts.map +1 -0
- package/dist/impl/fs/index.js +11 -0
- package/dist/impl/fs/utils/data-updater.d.ts +36 -0
- package/dist/impl/fs/utils/data-updater.d.ts.map +1 -0
- package/dist/impl/fs/utils/data-updater.js +248 -0
- package/dist/impl/fs/utils/deep-equal.d.ts +5 -0
- package/dist/impl/fs/utils/deep-equal.d.ts.map +1 -0
- package/dist/impl/fs/utils/deep-equal.js +28 -0
- package/dist/impl/index.d.ts +12 -0
- package/dist/impl/index.d.ts.map +1 -0
- package/dist/impl/index.js +12 -0
- package/dist/impl/middleware/event-bridge-middleware.d.ts +7 -0
- package/dist/impl/middleware/event-bridge-middleware.d.ts.map +1 -0
- package/dist/impl/middleware/event-bridge-middleware.js +19 -0
- package/dist/impl/middleware/index.d.ts +6 -0
- package/dist/impl/middleware/index.d.ts.map +1 -0
- package/dist/impl/middleware/index.js +5 -0
- package/dist/impl/middleware/logger-middleware.d.ts +7 -0
- package/dist/impl/middleware/logger-middleware.d.ts.map +1 -0
- package/dist/impl/middleware/logger-middleware.js +18 -0
- package/dist/impl/plugin/index.d.ts +5 -0
- package/dist/impl/plugin/index.d.ts.map +1 -0
- package/dist/impl/plugin/index.js +4 -0
- package/dist/impl/plugin/store-plugin-factory.d.ts +15 -0
- package/dist/impl/plugin/store-plugin-factory.d.ts.map +1 -0
- package/dist/impl/plugin/store-plugin-factory.js +121 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/spi/autosave/i-autosave-provider.d.ts +98 -0
- package/dist/spi/autosave/i-autosave-provider.d.ts.map +1 -0
- package/dist/spi/autosave/i-autosave-provider.js +8 -0
- package/dist/spi/autosave/i-autosave-registry.d.ts +59 -0
- package/dist/spi/autosave/i-autosave-registry.d.ts.map +1 -0
- package/dist/spi/autosave/i-autosave-registry.js +8 -0
- package/dist/spi/autosave/index.d.ts +8 -0
- package/dist/spi/autosave/index.d.ts.map +1 -0
- package/dist/spi/autosave/index.js +7 -0
- package/dist/spi/index.d.ts +9 -0
- package/dist/spi/index.d.ts.map +1 -0
- package/dist/spi/index.js +9 -0
- package/dist/spi/middleware/index.d.ts +2 -0
- package/dist/spi/middleware/index.d.ts.map +1 -0
- package/dist/spi/middleware/index.js +1 -0
- package/dist/spi/middleware/middleware-provider.d.ts +9 -0
- package/dist/spi/middleware/middleware-provider.d.ts.map +1 -0
- package/dist/spi/middleware/middleware-provider.js +1 -0
- package/dist/spi/persistence/index.d.ts +2 -0
- package/dist/spi/persistence/index.d.ts.map +1 -0
- package/dist/spi/persistence/index.js +1 -0
- package/dist/spi/persistence/persistence-provider.d.ts +8 -0
- package/dist/spi/persistence/persistence-provider.d.ts.map +1 -0
- package/dist/spi/persistence/persistence-provider.js +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autosave Action Types
|
|
3
|
+
*
|
|
4
|
+
* These actions orchestrate the autosave lifecycle but do NOT execute saves.
|
|
5
|
+
* Actual saves are performed by plugin providers using their own actions
|
|
6
|
+
* (e.g., PUT_REQUEST for remote-fs, UPDATE_ENTITY for remote-resource).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Autosave action type constants
|
|
10
|
+
*/
|
|
11
|
+
export var AutosaveActionTypes;
|
|
12
|
+
(function (AutosaveActionTypes) {
|
|
13
|
+
// ─────────────────────────────────────────────────────────────────
|
|
14
|
+
// Configuration Actions
|
|
15
|
+
// ─────────────────────────────────────────────────────────────────
|
|
16
|
+
/** Set autosave configuration for a path */
|
|
17
|
+
AutosaveActionTypes["SET_CONFIG"] = "@@autosave/SET_CONFIG";
|
|
18
|
+
/** Clear autosave configuration (revert to inherited) */
|
|
19
|
+
AutosaveActionTypes["CLEAR_CONFIG"] = "@@autosave/CLEAR_CONFIG";
|
|
20
|
+
// ─────────────────────────────────────────────────────────────────
|
|
21
|
+
// Lifecycle Actions (dispatched by middleware)
|
|
22
|
+
// ─────────────────────────────────────────────────────────────────
|
|
23
|
+
/** Content change detected, debounce timer started */
|
|
24
|
+
AutosaveActionTypes["CHANGE_DETECTED"] = "@@autosave/CHANGE_DETECTED";
|
|
25
|
+
/** Debounce timer expired, save will be triggered */
|
|
26
|
+
AutosaveActionTypes["DEBOUNCE_EXPIRED"] = "@@autosave/DEBOUNCE_EXPIRED";
|
|
27
|
+
/** Save operation started */
|
|
28
|
+
AutosaveActionTypes["SAVE_STARTED"] = "@@autosave/SAVE_STARTED";
|
|
29
|
+
/** Save completed successfully */
|
|
30
|
+
AutosaveActionTypes["SAVE_SUCCEEDED"] = "@@autosave/SAVE_SUCCEEDED";
|
|
31
|
+
/** Save failed */
|
|
32
|
+
AutosaveActionTypes["SAVE_FAILED"] = "@@autosave/SAVE_FAILED";
|
|
33
|
+
/** Retry scheduled */
|
|
34
|
+
AutosaveActionTypes["RETRY_SCHEDULED"] = "@@autosave/RETRY_SCHEDULED";
|
|
35
|
+
// ─────────────────────────────────────────────────────────────────
|
|
36
|
+
// Manual Trigger Actions
|
|
37
|
+
// ─────────────────────────────────────────────────────────────────
|
|
38
|
+
/** Flush pending save immediately (cancels debounce) */
|
|
39
|
+
AutosaveActionTypes["FLUSH_PENDING"] = "@@autosave/FLUSH_PENDING";
|
|
40
|
+
/** Flush all pending saves */
|
|
41
|
+
AutosaveActionTypes["FLUSH_ALL_PENDING"] = "@@autosave/FLUSH_ALL_PENDING";
|
|
42
|
+
/** Cancel pending save */
|
|
43
|
+
AutosaveActionTypes["CANCEL_PENDING"] = "@@autosave/CANCEL_PENDING";
|
|
44
|
+
})(AutosaveActionTypes || (AutosaveActionTypes = {}));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autosave Types
|
|
3
|
+
*
|
|
4
|
+
* Core types for the autosave feature. These are used by:
|
|
5
|
+
* - ui-store-impl: Core autosave middleware
|
|
6
|
+
* - Plugin providers: RemoteFs, Resource, Git autosave providers
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Extension state key for autosave
|
|
10
|
+
* Used to store autosave state in FileSystemNode.state.extensionStates
|
|
11
|
+
*/
|
|
12
|
+
export declare const AUTOSAVE_EXTENSION_KEY = "autosave";
|
|
13
|
+
/**
|
|
14
|
+
* Autosave configuration
|
|
15
|
+
*
|
|
16
|
+
* Can be set at multiple levels with inheritance:
|
|
17
|
+
* - File node extension state (highest priority)
|
|
18
|
+
* - Parent folder extension state
|
|
19
|
+
* - Plugin default config
|
|
20
|
+
* - Global default config (lowest priority)
|
|
21
|
+
*/
|
|
22
|
+
export interface AutosaveConfig {
|
|
23
|
+
/** Enable/disable autosave */
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
/** Debounce delay in milliseconds before triggering save. Default: 1500 */
|
|
26
|
+
debounceMs?: number;
|
|
27
|
+
/** Maximum wait time before forced save regardless of continued edits. Default: 10000 */
|
|
28
|
+
maxWaitMs?: number;
|
|
29
|
+
/** Save when file loses focus. Default: true */
|
|
30
|
+
saveOnBlur?: boolean;
|
|
31
|
+
/** Retry failed saves automatically. Default: true */
|
|
32
|
+
retryOnFailure?: boolean;
|
|
33
|
+
/** Maximum retry attempts before giving up. Default: 3 */
|
|
34
|
+
maxRetries?: number;
|
|
35
|
+
/** Inherit configuration from parent folder. Default: true */
|
|
36
|
+
inherit?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Autosave status values
|
|
40
|
+
*/
|
|
41
|
+
export type AutosaveStatus = 'idle' | 'pending' | 'saving' | 'error' | 'disabled';
|
|
42
|
+
/**
|
|
43
|
+
* Autosave error information
|
|
44
|
+
*/
|
|
45
|
+
export interface AutosaveError {
|
|
46
|
+
/** Error code */
|
|
47
|
+
code: string;
|
|
48
|
+
/** Error message */
|
|
49
|
+
message: string;
|
|
50
|
+
/** Which retry attempt this error occurred on */
|
|
51
|
+
attempt: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Autosave extension state
|
|
55
|
+
*
|
|
56
|
+
* Stored in FileSystemNode.state.extensionStates[AUTOSAVE_EXTENSION_KEY]
|
|
57
|
+
*/
|
|
58
|
+
export interface AutosaveExtensionState {
|
|
59
|
+
/** Explicit configuration on this node (undefined if inherited) */
|
|
60
|
+
config?: AutosaveConfig;
|
|
61
|
+
/** Computed: is autosave effectively enabled for this node? */
|
|
62
|
+
effectivelyEnabled: boolean;
|
|
63
|
+
/** Current autosave status */
|
|
64
|
+
status: AutosaveStatus;
|
|
65
|
+
/** Timestamp when content first became dirty (pending save) */
|
|
66
|
+
pendingSince?: number;
|
|
67
|
+
/** Timestamp of last save attempt */
|
|
68
|
+
lastSaveAttempt?: number;
|
|
69
|
+
/** Timestamp of last successful save */
|
|
70
|
+
lastSaveSuccess?: number;
|
|
71
|
+
/** Last save error (cleared on success) */
|
|
72
|
+
lastSaveError?: AutosaveError;
|
|
73
|
+
/** Current retry count (reset on success) */
|
|
74
|
+
retryCount?: number;
|
|
75
|
+
/** Provider ID that handles this node */
|
|
76
|
+
providerId?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Default autosave configuration values
|
|
80
|
+
*/
|
|
81
|
+
export declare const DEFAULT_AUTOSAVE_CONFIG: Required<AutosaveConfig>;
|
|
82
|
+
/**
|
|
83
|
+
* Create initial autosave extension state
|
|
84
|
+
*/
|
|
85
|
+
export declare function createInitialAutosaveState(config?: AutosaveConfig, providerId?: string): AutosaveExtensionState;
|
|
86
|
+
//# sourceMappingURL=autosave-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autosave-types.d.ts","sourceRoot":"","sources":["../../../src/api/autosave/autosave-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,OAAO,EAAE,OAAO,CAAC;IAEjB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,sDAAsD;IACtD,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,SAAS,GACT,QAAQ,GACR,OAAO,GACP,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IAEb,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAEhB,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,+DAA+D;IAC/D,kBAAkB,EAAE,OAAO,CAAC;IAE5B,8BAA8B;IAC9B,MAAM,EAAE,cAAc,CAAC;IAEvB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,wCAAwC;IACxC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,cAAc,CAQ5D,CAAC;AAEF;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,CAAC,EAAE,cAAc,EACvB,UAAU,CAAC,EAAE,MAAM,GAClB,sBAAsB,CAOxB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autosave Types
|
|
3
|
+
*
|
|
4
|
+
* Core types for the autosave feature. These are used by:
|
|
5
|
+
* - ui-store-impl: Core autosave middleware
|
|
6
|
+
* - Plugin providers: RemoteFs, Resource, Git autosave providers
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Extension state key for autosave
|
|
10
|
+
* Used to store autosave state in FileSystemNode.state.extensionStates
|
|
11
|
+
*/
|
|
12
|
+
export const AUTOSAVE_EXTENSION_KEY = 'autosave';
|
|
13
|
+
/**
|
|
14
|
+
* Default autosave configuration values
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_AUTOSAVE_CONFIG = {
|
|
17
|
+
enabled: false,
|
|
18
|
+
debounceMs: 1500,
|
|
19
|
+
maxWaitMs: 10000,
|
|
20
|
+
saveOnBlur: true,
|
|
21
|
+
retryOnFailure: true,
|
|
22
|
+
maxRetries: 3,
|
|
23
|
+
inherit: true,
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Create initial autosave extension state
|
|
27
|
+
*/
|
|
28
|
+
export function createInitialAutosaveState(config, providerId) {
|
|
29
|
+
return {
|
|
30
|
+
config,
|
|
31
|
+
effectivelyEnabled: config?.enabled ?? false,
|
|
32
|
+
status: config?.enabled === false ? 'disabled' : 'idle',
|
|
33
|
+
providerId,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/autosave/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { FileSystemNode, DirectoryNode, FileNode, Path } from '@hamak/shared-utils';
|
|
2
|
+
/**
|
|
3
|
+
* High-level facade for filesystem operations
|
|
4
|
+
* Provides a convenient API over the filesystem manager
|
|
5
|
+
*/
|
|
6
|
+
export interface IFileSystemFacade {
|
|
7
|
+
/**
|
|
8
|
+
* Get the root directory node
|
|
9
|
+
*/
|
|
10
|
+
getRoot(): DirectoryNode;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve a file or directory at the given path
|
|
13
|
+
*/
|
|
14
|
+
resolve(path: Path): FileSystemNode | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve a file at the given path
|
|
17
|
+
*/
|
|
18
|
+
resolveFile<T = any>(path: Path): FileNode<T> | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Resolve a directory at the given path
|
|
21
|
+
*/
|
|
22
|
+
resolveDirectory(path: Path): DirectoryNode | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Create or update a file at the given path
|
|
25
|
+
*/
|
|
26
|
+
setFile<T = any>(path: Path, content: T, schema?: string, params?: {
|
|
27
|
+
override?: boolean;
|
|
28
|
+
contentIsPresent?: boolean;
|
|
29
|
+
}): void;
|
|
30
|
+
/**
|
|
31
|
+
* Update file content at the given path
|
|
32
|
+
*/
|
|
33
|
+
updateFileContent<T = any>(path: Path, content: T): void;
|
|
34
|
+
/**
|
|
35
|
+
* Create a directory at the given path
|
|
36
|
+
*/
|
|
37
|
+
mkdir(path: Path, params?: {
|
|
38
|
+
override?: boolean;
|
|
39
|
+
}): void;
|
|
40
|
+
/**
|
|
41
|
+
* Remove a file or directory at the given path
|
|
42
|
+
*/
|
|
43
|
+
remove(path: Path): void;
|
|
44
|
+
/**
|
|
45
|
+
* Check if a path exists
|
|
46
|
+
*/
|
|
47
|
+
exists(path: Path): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Check if a path is a file
|
|
50
|
+
*/
|
|
51
|
+
isFile(path: Path): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Check if a path is a directory
|
|
54
|
+
*/
|
|
55
|
+
isDirectory(path: Path): boolean;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=filesystem-facade.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem-facade.contract.d.ts","sourceRoot":"","sources":["../../../../src/api/fs/contracts/filesystem-facade.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,IAAI,aAAa,CAAC;IAEzB;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,cAAc,GAAG,SAAS,CAAC;IAEhD;;OAEG;IACH,WAAW,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAE1D;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa,GAAG,SAAS,CAAC;IAExD;;OAEG;IACH,OAAO,CAAC,CAAC,GAAG,GAAG,EACb,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CAAC,EACV,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,GAC1D,IAAI,CAAC;IAER;;OAEG;IACH,iBAAiB,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { FileSystemNode, FileSystemState } from '@hamak/shared-utils';
|
|
2
|
+
import { Action } from 'redux';
|
|
3
|
+
/**
|
|
4
|
+
* Redux selector function type
|
|
5
|
+
*/
|
|
6
|
+
export type Selector<S, R> = (state: S) => R;
|
|
7
|
+
/**
|
|
8
|
+
* Actions for filesystem operations
|
|
9
|
+
*/
|
|
10
|
+
export interface FileSystemNodeAction extends Action {
|
|
11
|
+
command: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Parameters for filesystem node actions
|
|
15
|
+
*/
|
|
16
|
+
export interface FileSystemNodeActionParams {
|
|
17
|
+
override?: boolean;
|
|
18
|
+
contentIsPresent?: boolean;
|
|
19
|
+
extensionStates?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Filesystem manager interface - manages Redux state for virtual filesystem
|
|
23
|
+
*/
|
|
24
|
+
export interface IFileSystemManager {
|
|
25
|
+
/**
|
|
26
|
+
* Get the slice name for this filesystem
|
|
27
|
+
*/
|
|
28
|
+
readonly sliceName: string;
|
|
29
|
+
/**
|
|
30
|
+
* Get initial filesystem state
|
|
31
|
+
*/
|
|
32
|
+
getInitialState(): FileSystemState;
|
|
33
|
+
/**
|
|
34
|
+
* Get the reducer function for filesystem operations
|
|
35
|
+
*/
|
|
36
|
+
getReducer(): (state: FileSystemState, action: Action) => FileSystemState;
|
|
37
|
+
/**
|
|
38
|
+
* Create a selector for a specific path in the filesystem
|
|
39
|
+
*/
|
|
40
|
+
createSelector<S>(fileSystemSelector: Selector<S, FileSystemState | undefined>, path: string | string[]): Selector<S, FileSystemNode | undefined>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=filesystem-manager.contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem-manager.contract.d.ts","sourceRoot":"","sources":["../../../../src/api/fs/contracts/filesystem-manager.contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,MAAM;IAClD,OAAO,EAAE,GAAG,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,eAAe,IAAI,eAAe,CAAC;IAEnC;;OAEG;IACH,UAAU,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,KAAK,eAAe,CAAC;IAE1E;;OAEG;IACH,cAAc,CAAC,CAAC,EACd,kBAAkB,EAAE,QAAQ,CAAC,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC,EAC5D,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GACtB,QAAQ,CAAC,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { FileSystemNode, DirectoryNode, FileNode, FileSystemNodeBase, FileSystemNodeState, FileMemoState, FileSystemState, FileContentSchema } from '@hamak/shared-utils';
|
|
2
|
+
export { fileSystemNodeInitialState } from '@hamak/shared-utils';
|
|
3
|
+
export * from './contracts/filesystem-manager.contract';
|
|
4
|
+
export * from './contracts/filesystem-facade.contract';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/fs/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,cAAc,EACd,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAGjE,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI Store API
|
|
3
|
+
* Public interfaces, types, and tokens for Redux state management
|
|
4
|
+
*/
|
|
5
|
+
export * from './types';
|
|
6
|
+
export * from './api';
|
|
7
|
+
export * from './tokens';
|
|
8
|
+
export * from './fs';
|
|
9
|
+
export * from './autosave';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/tokens/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency Injection Tokens
|
|
3
|
+
* Used for service resolution in the microkernel
|
|
4
|
+
*/
|
|
5
|
+
export declare const STORE_MANAGER_TOKEN: unique symbol;
|
|
6
|
+
export declare const MIDDLEWARE_REGISTRY_TOKEN: unique symbol;
|
|
7
|
+
export declare const REDUCER_REGISTRY_TOKEN: unique symbol;
|
|
8
|
+
export declare const STORE_EXTENSIONS_TOKEN: unique symbol;
|
|
9
|
+
export declare const AUTOSAVE_REGISTRY_TOKEN: unique symbol;
|
|
10
|
+
//# sourceMappingURL=service-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-tokens.d.ts","sourceRoot":"","sources":["../../../src/api/tokens/service-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,mBAAmB,eAAyB,CAAC;AAC1D,eAAO,MAAM,yBAAyB,eAA+B,CAAC;AACtE,eAAO,MAAM,sBAAsB,eAA4B,CAAC;AAChE,eAAO,MAAM,sBAAsB,eAA4B,CAAC;AAGhE,eAAO,MAAM,uBAAuB,eAA6B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependency Injection Tokens
|
|
3
|
+
* Used for service resolution in the microkernel
|
|
4
|
+
*/
|
|
5
|
+
export const STORE_MANAGER_TOKEN = Symbol('StoreManager');
|
|
6
|
+
export const MIDDLEWARE_REGISTRY_TOKEN = Symbol('MiddlewareRegistry');
|
|
7
|
+
export const REDUCER_REGISTRY_TOKEN = Symbol('ReducerRegistry');
|
|
8
|
+
export const STORE_EXTENSIONS_TOKEN = Symbol('StoreExtensions');
|
|
9
|
+
// Autosave tokens
|
|
10
|
+
export const AUTOSAVE_REGISTRY_TOKEN = Symbol('AutosaveRegistry');
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store extension types
|
|
3
|
+
*/
|
|
4
|
+
import type { Reducer } from 'redux';
|
|
5
|
+
import type { MiddlewareRegistration } from './middleware-types';
|
|
6
|
+
/**
|
|
7
|
+
* Middleware contribution matches registry entries
|
|
8
|
+
*/
|
|
9
|
+
export type StoreMiddlewareExtension = MiddlewareRegistration;
|
|
10
|
+
/**
|
|
11
|
+
* Factory function for creating middleware with access to fileSystemAdapter
|
|
12
|
+
*/
|
|
13
|
+
export type MiddlewareFactory = (fileSystemAdapter: any) => StoreMiddlewareExtension[];
|
|
14
|
+
/**
|
|
15
|
+
* Extension payload that mirrors store plugin config
|
|
16
|
+
*/
|
|
17
|
+
export interface StorePluginExtensions {
|
|
18
|
+
middleware?: StoreMiddlewareExtension[];
|
|
19
|
+
/**
|
|
20
|
+
* Factory function for creating middleware that needs the fileSystemAdapter.
|
|
21
|
+
* Called during plugin initialization after the adapter is created.
|
|
22
|
+
*/
|
|
23
|
+
middlewareFactory?: MiddlewareFactory;
|
|
24
|
+
reducers?: Record<string, Reducer>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Registry exposed via STORE_EXTENSIONS_TOKEN
|
|
28
|
+
*/
|
|
29
|
+
export interface StoreExtensionsRegistry {
|
|
30
|
+
register(source: string, extensions: StorePluginExtensions): void;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=extension-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/extension-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,iBAAiB,EAAE,GAAG,KAAK,wBAAwB,EAAE,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACxC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Middleware Type Definitions
|
|
3
|
+
*/
|
|
4
|
+
import type { Middleware } from 'redux';
|
|
5
|
+
/**
|
|
6
|
+
* Middleware registration with metadata
|
|
7
|
+
*/
|
|
8
|
+
export interface MiddlewareRegistration {
|
|
9
|
+
/** Unique identifier for this middleware */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The Redux middleware function */
|
|
12
|
+
middleware: Middleware;
|
|
13
|
+
/** Execution priority (higher = runs earlier). Default: 0 */
|
|
14
|
+
priority?: number;
|
|
15
|
+
/** Plugin that registered this middleware */
|
|
16
|
+
plugin?: string;
|
|
17
|
+
/** Optional description for debugging */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Whether this middleware can be disabled */
|
|
20
|
+
optional?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Middleware configuration
|
|
24
|
+
*/
|
|
25
|
+
export interface MiddlewareConfig {
|
|
26
|
+
/** Middleware IDs to disable */
|
|
27
|
+
disabled?: string[];
|
|
28
|
+
/** Override priorities for specific middleware */
|
|
29
|
+
priorities?: Record<string, number>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=middleware-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/middleware-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IAEX,oCAAoC;IACpC,UAAU,EAAE,UAAU,CAAC;IAEvB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reducer Type Definitions
|
|
3
|
+
*/
|
|
4
|
+
import type { Reducer } from 'redux';
|
|
5
|
+
/**
|
|
6
|
+
* Reducer registration metadata
|
|
7
|
+
*/
|
|
8
|
+
export interface ReducerRegistration {
|
|
9
|
+
/** State slice key */
|
|
10
|
+
key: string;
|
|
11
|
+
/** The reducer function */
|
|
12
|
+
reducer: Reducer;
|
|
13
|
+
/** Plugin that registered this reducer */
|
|
14
|
+
plugin?: string;
|
|
15
|
+
/** Timestamp of registration */
|
|
16
|
+
registeredAt: Date;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Reducer map type
|
|
20
|
+
*/
|
|
21
|
+
export type ReducerMap = Record<string, Reducer>;
|
|
22
|
+
//# sourceMappingURL=reducer-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/reducer-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sBAAsB;IACtB,GAAG,EAAE,MAAM,CAAC;IAEZ,2BAA2B;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gCAAgC;IAChC,YAAY,EAAE,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store Type Definitions
|
|
3
|
+
*/
|
|
4
|
+
import type { Store, Action, StoreEnhancer } from 'redux';
|
|
5
|
+
/**
|
|
6
|
+
* Store configuration
|
|
7
|
+
*/
|
|
8
|
+
export interface StoreConfig {
|
|
9
|
+
/** Enable Redux DevTools integration */
|
|
10
|
+
devTools?: boolean;
|
|
11
|
+
/** Initial/preloaded state */
|
|
12
|
+
preloadedState?: any;
|
|
13
|
+
/** Additional store enhancers */
|
|
14
|
+
enhancers?: StoreEnhancer[];
|
|
15
|
+
/** Persistence configuration */
|
|
16
|
+
persistence?: {
|
|
17
|
+
/** Enable state persistence */
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
/** Storage key prefix */
|
|
20
|
+
key?: string;
|
|
21
|
+
/** Storage type */
|
|
22
|
+
storage?: 'localStorage' | 'sessionStorage' | 'indexedDB';
|
|
23
|
+
/** Keys to persist (whitelist) */
|
|
24
|
+
whitelist?: string[];
|
|
25
|
+
/** Keys to ignore (blacklist) */
|
|
26
|
+
blacklist?: string[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Root state shape (can be extended by applications)
|
|
31
|
+
*/
|
|
32
|
+
export interface RootState {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Standard action shape following FSA (Flux Standard Action)
|
|
37
|
+
*/
|
|
38
|
+
export interface AppAction<T = any> extends Action<string> {
|
|
39
|
+
type: string;
|
|
40
|
+
payload?: T;
|
|
41
|
+
error?: boolean;
|
|
42
|
+
meta?: any;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Store instance type
|
|
47
|
+
*/
|
|
48
|
+
export type AppStore = Store<RootState, AppAction>;
|
|
49
|
+
//# sourceMappingURL=store-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/store-types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,8BAA8B;IAC9B,cAAc,CAAC,EAAE,GAAG,CAAC;IAErB,iCAAiC;IACjC,SAAS,CAAC,EAAE,aAAa,EAAE,CAAC;IAE5B,gCAAgC;IAChC,WAAW,CAAC,EAAE;QACZ,+BAA+B;QAC/B,OAAO,EAAE,OAAO,CAAC;QACjB,yBAAyB;QACzB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,mBAAmB;QACnB,OAAO,CAAC,EAAE,cAAc,GAAG,gBAAgB,GAAG,WAAW,CAAC;QAC1D,kCAAkC;QAClC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,iCAAiC;QACjC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,MAAM,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,CAAC;IACZ,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autosave Configuration Resolver
|
|
3
|
+
*
|
|
4
|
+
* Resolves autosave configuration with hierarchical inheritance.
|
|
5
|
+
* Configuration priority (highest to lowest):
|
|
6
|
+
* 1. File node extension state config
|
|
7
|
+
* 2. Parent folder config (recursive, respects inherit flag)
|
|
8
|
+
* 3. Default config
|
|
9
|
+
*/
|
|
10
|
+
import type { FileSystemNode, DirectoryNode } from '@hamak/shared-utils';
|
|
11
|
+
import { type AutosaveConfig, type AutosaveExtensionState } from '../../api';
|
|
12
|
+
/**
|
|
13
|
+
* Get autosave extension state from a node
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAutosaveExtensionState(node: FileSystemNode | undefined): AutosaveExtensionState | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Get autosave config from a node's extension state
|
|
18
|
+
*/
|
|
19
|
+
export declare function getAutosaveConfig(node: FileSystemNode | undefined): AutosaveConfig | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve autosave configuration for a path with inheritance
|
|
22
|
+
*
|
|
23
|
+
* @param root - Root directory node
|
|
24
|
+
* @param path - Path segments to the target node
|
|
25
|
+
* @param defaultConfig - Default configuration to use if none found
|
|
26
|
+
* @returns Resolved configuration
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveAutosaveConfig(root: DirectoryNode, path: string[], defaultConfig?: AutosaveConfig): AutosaveConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Check if autosave is effectively enabled for a path
|
|
31
|
+
*/
|
|
32
|
+
export declare function isAutosaveEnabled(root: DirectoryNode, path: string[], defaultConfig?: AutosaveConfig): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Get node at path
|
|
35
|
+
*/
|
|
36
|
+
export declare function getNodeAtPath(root: DirectoryNode, path: string[]): FileSystemNode | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Convert path array to string key
|
|
39
|
+
*/
|
|
40
|
+
export declare function pathToKey(path: string[]): string;
|
|
41
|
+
/**
|
|
42
|
+
* Convert string key back to path array
|
|
43
|
+
*/
|
|
44
|
+
export declare function keyToPath(key: string): string[];
|
|
45
|
+
//# sourceMappingURL=autosave-config-resolver.d.ts.map
|