@diphyx/harlemify 4.0.1 → 5.0.0

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 (42) hide show
  1. package/README.md +15 -19
  2. package/dist/module.d.mts +5 -0
  3. package/dist/module.d.ts +5 -0
  4. package/dist/module.json +1 -1
  5. package/dist/runtime/composables/action.d.ts +2 -2
  6. package/dist/runtime/core/layers/action.d.ts +3 -2
  7. package/dist/runtime/core/layers/action.js +37 -69
  8. package/dist/runtime/core/layers/model.js +14 -0
  9. package/dist/runtime/core/layers/shape.d.ts +2 -2
  10. package/dist/runtime/core/layers/shape.js +3 -2
  11. package/dist/runtime/core/layers/view.d.ts +2 -2
  12. package/dist/runtime/core/layers/view.js +27 -5
  13. package/dist/runtime/core/store.d.ts +5 -23
  14. package/dist/runtime/core/store.js +8 -28
  15. package/dist/runtime/core/types/action.d.ts +78 -119
  16. package/dist/runtime/core/types/action.js +0 -16
  17. package/dist/runtime/core/types/base.d.ts +6 -0
  18. package/dist/runtime/core/types/base.js +0 -0
  19. package/dist/runtime/core/types/model.d.ts +47 -32
  20. package/dist/runtime/core/types/model.js +14 -0
  21. package/dist/runtime/core/types/shape.d.ts +30 -5
  22. package/dist/runtime/core/types/store.d.ts +14 -0
  23. package/dist/runtime/core/types/store.js +0 -0
  24. package/dist/runtime/core/types/view.d.ts +35 -24
  25. package/dist/runtime/core/types/view.js +5 -0
  26. package/dist/runtime/core/utils/action.d.ts +4 -4
  27. package/dist/runtime/core/utils/action.js +219 -203
  28. package/dist/runtime/core/utils/base.d.ts +4 -0
  29. package/dist/runtime/core/utils/base.js +24 -0
  30. package/dist/runtime/core/utils/error.d.ts +21 -0
  31. package/dist/runtime/core/utils/error.js +36 -0
  32. package/dist/runtime/core/utils/model.d.ts +3 -11
  33. package/dist/runtime/core/utils/model.js +104 -110
  34. package/dist/runtime/core/utils/shape.d.ts +6 -3
  35. package/dist/runtime/core/utils/shape.js +218 -14
  36. package/dist/runtime/core/utils/store.d.ts +8 -0
  37. package/dist/runtime/core/utils/store.js +35 -0
  38. package/dist/runtime/core/utils/view.d.ts +3 -4
  39. package/dist/runtime/core/utils/view.js +35 -14
  40. package/dist/runtime/index.d.ts +8 -4
  41. package/dist/runtime/index.js +4 -9
  42. package/package.json +2 -1
@@ -1,9 +1,13 @@
1
1
  export { createStore } from "./core/store.js";
2
- export type { Store, StoreConfig } from "./core/store.js";
2
+ export type { Store, StoreConfig } from "./core/types/store.js";
3
3
  export { shape } from "./core/layers/shape.js";
4
4
  export type { ShapeInfer } from "./core/types/shape.js";
5
- export { ModelKind } from "./core/types/model.js";
6
- export { AUTO, ActionOneMode, ActionManyMode, ActionStatus, ActionConcurrent, ActionApiMethod, } from "./core/types/action.js";
7
- export type { Action, ActionCallPayload, ActionApiShortcutDefinition, ActionError, ActionApiError, ActionHandleError, ActionCommitError, ActionConcurrentError, } from "./core/types/action.js";
5
+ export { ModelKind, ModelOneMode, ModelManyMode } from "./core/types/model.js";
6
+ export type { ModelOneCommitOptions, ModelManyCommitOptions } from "./core/types/model.js";
7
+ export { ViewClone } from "./core/types/view.js";
8
+ export type { ViewDefinitionOptions } from "./core/types/view.js";
9
+ export { ActionStatus, ActionConcurrent, ActionApiMethod } from "./core/types/action.js";
10
+ export type { ActionCall, ActionCallOptions, ActionCallTransformerOptions, ActionCallBindOptions, ActionCallCommitOptions, ActionResolvedApi, } from "./core/types/action.js";
11
+ export { ActionApiError, ActionHandlerError, ActionCommitError, ActionConcurrentError } from "./core/utils/error.js";
8
12
  export { useIsolatedActionStatus, useIsolatedActionError } from "./composables/action.js";
9
13
  export type { RuntimeConfig } from "./config.js";
@@ -1,12 +1,7 @@
1
1
  export { createStore } from "./core/store.js";
2
2
  export { shape } from "./core/layers/shape.js";
3
- export { ModelKind } from "./core/types/model.js";
4
- export {
5
- AUTO,
6
- ActionOneMode,
7
- ActionManyMode,
8
- ActionStatus,
9
- ActionConcurrent,
10
- ActionApiMethod
11
- } from "./core/types/action.js";
3
+ export { ModelKind, ModelOneMode, ModelManyMode } from "./core/types/model.js";
4
+ export { ViewClone } from "./core/types/view.js";
5
+ export { ActionStatus, ActionConcurrent, ActionApiMethod } from "./core/types/action.js";
6
+ export { ActionApiError, ActionHandlerError, ActionCommitError, ActionConcurrentError } from "./core/utils/error.js";
12
7
  export { useIsolatedActionStatus, useIsolatedActionError } from "./composables/action.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diphyx/harlemify",
3
- "version": "4.0.1",
3
+ "version": "5.0.0",
4
4
  "description": "API state management for Nuxt powered by Harlem",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -55,6 +55,7 @@
55
55
  "@nuxt/test-utils": "^3.14.0",
56
56
  "@playwright/test": "^1.50.0",
57
57
  "@types/node": "^22.0.0",
58
+ "@vitest/coverage-v8": "^2.1.9",
58
59
  "eslint": "^9.0.0",
59
60
  "nuxt": "^3.14.0",
60
61
  "typescript": "^5.6.0",