@hamak/ui-store-impl 0.4.1 → 0.4.3

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.
@@ -1,23 +1,10 @@
1
1
  import { fileSystemNodeInitialState } from '@hamak/ui-store-api';
2
+ import { pathSteps } from '@hamak/shared-utils';
2
3
  import { DataUpdater } from '../utils/data-updater';
3
4
  import { produce, current, isDraft, original } from 'immer';
4
5
  import { deepEqual } from '../utils/deep-equal';
5
- /**
6
- * Convert path to steps array
7
- */
8
- export function pathSteps(path) {
9
- if (Array.isArray(path)) {
10
- return path;
11
- }
12
- return path.split('/').filter(s => s.trim().length > 0);
13
- }
14
- /**
15
- * Get parent path steps
16
- */
17
- export function parentPathSteps(path) {
18
- const steps = pathSteps(path);
19
- return steps.length > 0 ? steps.slice(0, steps.length - 1) : steps;
20
- }
6
+ // Re-export path utilities from shared-utils for internal use
7
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
21
8
  /**
22
9
  * Get filesystem node at path
23
10
  */
@@ -4,6 +4,8 @@ export * from './core/fs-facade';
4
4
  // Commands
5
5
  export * from './commands/fs-commands';
6
6
  export * from './commands/structure-commands';
7
+ // Re-export path utilities from shared-utils for backward compatibility
8
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
7
9
  // Utilities
8
10
  export * from './utils/data-updater';
9
11
  export * from './utils/deep-equal';
@@ -51,14 +51,7 @@ export interface SetFileContentCommand extends FsCommandBase {
51
51
  * Union type for all filesystem commands
52
52
  */
53
53
  export type FileSystemCommand = MkdirCommand | RemoveCommand | SetFileCommand | UpdateFileContentCommand | SetFileContentCommand;
54
- /**
55
- * Convert path to steps array
56
- */
57
- export declare function pathSteps(path: string | string[]): string[];
58
- /**
59
- * Get parent path steps
60
- */
61
- export declare function parentPathSteps(path: string | string[]): string[];
54
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
62
55
  /**
63
56
  * Get filesystem node at path
64
57
  */
@@ -1 +1 @@
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B,GACzB,YAAY,GACZ,aAAa,GACb,cAAc,GACd,wBAAwB,GACxB,qBAAqB,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEjE;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAG,MAAM,GAAG,MAAM,EAAE,GAAI,cAAc,GAAG,SAAS,CAe/G;AAqBD;;GAEG;AACH,qBAAa,wBAAwB;IACnC,QAAQ,CAAC,qBAAqB,4BAAkC;IAEhE,OAAO,CAAC,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,GAAG,eAAe;IAU5E,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,aAAa;IAyBrB,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,qBAAqB;IA0B7B,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,wBAAwB;IAmChC,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,EAAG,CAAC,GAAE,CAAC;IAQnC,SAAS,CAAC,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,EAAG,CAAC,GAAE,CAAC,GAAG,SAAS;CAOjD;AAED;;GAEG;AACH,qBAAa,yBAAyB;IACpC,QAAQ,CAAC,OAAO,cAAoB;IAEpC,OAAO,CAAC,IAAI,EAAG,QAAQ,EAAE,OAAO,EAAE,oBAAoB;IAoBtD,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,aAAa;IAUrB;;OAEG;IACI,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,GAAG,IAAI;CAKxD"}
@@ -1,23 +1,10 @@
1
1
  import { fileSystemNodeInitialState } from '@hamak/ui-store-api';
2
+ import { pathSteps } from '@hamak/shared-utils';
2
3
  import { DataUpdater } from '../utils/data-updater';
3
4
  import { produce, current, isDraft, original } from 'immer';
4
5
  import { deepEqual } from '../utils/deep-equal';
5
- /**
6
- * Convert path to steps array
7
- */
8
- export function pathSteps(path) {
9
- if (Array.isArray(path)) {
10
- return path;
11
- }
12
- return path.split('/').filter(s => s.trim().length > 0);
13
- }
14
- /**
15
- * Get parent path steps
16
- */
17
- export function parentPathSteps(path) {
18
- const steps = pathSteps(path);
19
- return steps.length > 0 ? steps.slice(0, steps.length - 1) : steps;
20
- }
6
+ // Re-export path utilities from shared-utils for internal use
7
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
21
8
  /**
22
9
  * Get filesystem node at path
23
10
  */
@@ -2,6 +2,7 @@ export * from './core/fs-adapter';
2
2
  export * from './core/fs-facade';
3
3
  export * from './commands/fs-commands';
4
4
  export * from './commands/structure-commands';
5
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
5
6
  export * from './utils/data-updater';
6
7
  export * from './utils/deep-equal';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fs/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAG9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fs/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGjE,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
package/dist/fs/index.js CHANGED
@@ -4,6 +4,8 @@ export * from './core/fs-facade';
4
4
  // Commands
5
5
  export * from './commands/fs-commands';
6
6
  export * from './commands/structure-commands';
7
+ // Re-export path utilities from shared-utils for backward compatibility
8
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
7
9
  // Utilities
8
10
  export * from './utils/data-updater';
9
11
  export * from './utils/deep-equal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamak/ui-store-impl",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "UI Store Implementation - Redux store implementation with middleware",
@@ -34,11 +34,11 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@hamak/shared-utils": "0.4.1",
38
- "@hamak/ui-store-api": "0.4.1",
39
- "@hamak/ui-store-spi": "0.4.1",
40
- "@hamak/microkernel-api": "0.4.1",
41
- "@hamak/microkernel-spi": "0.4.1",
37
+ "@hamak/shared-utils": "0.4.3",
38
+ "@hamak/ui-store-api": "0.4.3",
39
+ "@hamak/ui-store-spi": "0.4.3",
40
+ "@hamak/microkernel-api": "0.4.3",
41
+ "@hamak/microkernel-spi": "0.4.3",
42
42
  "@reduxjs/toolkit": "^2.0.0",
43
43
  "immer": "^10.0.0",
44
44
  "redux": "^5.0.1",
@@ -7,7 +7,7 @@ import {
7
7
  fileSystemNodeInitialState,
8
8
  FileSystemNodeState
9
9
  } from '@hamak/ui-store-api';
10
- import { Pathway, Holder } from '@hamak/shared-utils';
10
+ import { Pathway, Holder, pathSteps, parentPathSteps } from '@hamak/shared-utils';
11
11
  import { StructureNodeCommand } from './structure-commands';
12
12
  import { DataUpdater } from '../utils/data-updater';
13
13
  import { produce, current, isDraft, original } from 'immer';
@@ -75,24 +75,8 @@ export type FileSystemCommand =
75
75
  | UpdateFileContentCommand
76
76
  | SetFileContentCommand
77
77
 
78
- /**
79
- * Convert path to steps array
80
- */
81
- export function pathSteps(path : string | string[]) : string[] {
82
- if(Array.isArray(path)){
83
- return path
84
- }
85
-
86
- return path.split('/').filter(s => s.trim().length > 0)
87
- }
88
-
89
- /**
90
- * Get parent path steps
91
- */
92
- export function parentPathSteps(path : string | string[]) : string[] {
93
- const steps = pathSteps(path)
94
- return steps.length > 0 ? steps.slice(0, steps.length - 1) : steps
95
- }
78
+ // Re-export path utilities from shared-utils for internal use
79
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
96
80
 
97
81
  /**
98
82
  * Get filesystem node at path
package/src/fs/index.ts CHANGED
@@ -6,6 +6,9 @@ export * from './core/fs-facade';
6
6
  export * from './commands/fs-commands';
7
7
  export * from './commands/structure-commands';
8
8
 
9
+ // Re-export path utilities from shared-utils for backward compatibility
10
+ export { pathSteps, parentPathSteps } from '@hamak/shared-utils';
11
+
9
12
  // Utilities
10
13
  export * from './utils/data-updater';
11
14
  export * from './utils/deep-equal';