@stonecrop/stonecrop 0.11.6 → 0.11.8

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 (39) hide show
  1. package/dist/{composables → src/composables}/lazy-link.js +1 -1
  2. package/dist/src/registry.d.ts.map +1 -1
  3. package/dist/{registry.js → src/registry.js} +0 -2
  4. package/dist/src/stonecrop.d.ts.map +1 -1
  5. package/dist/src/stonecrop.js +565 -0
  6. package/dist/{stores → src/stores}/hst.js +1 -1
  7. package/dist/src/stores/operation-log.d.ts.map +1 -1
  8. package/dist/{stores → src/stores}/operation-log.js +1 -1
  9. package/dist/stonecrop.js +11 -9
  10. package/dist/stonecrop.js.map +1 -1
  11. package/dist/stonecrop.tsbuildinfo +1 -1
  12. package/dist/tsdoc-metadata.json +1 -1
  13. package/package.json +22 -22
  14. package/src/composables/lazy-link.ts +1 -1
  15. package/src/composables/stonecrop.ts +1 -1
  16. package/src/field-triggers.ts +1 -1
  17. package/src/registry.ts +2 -4
  18. package/src/stonecrop.ts +0 -1
  19. package/src/stores/hst.ts +1 -1
  20. package/src/stores/operation-log.ts +11 -9
  21. /package/dist/{composables → src/composables}/operation-log.js +0 -0
  22. /package/dist/{composables → src/composables}/stonecrop.js +0 -0
  23. /package/dist/{doctype.js → src/doctype.js} +0 -0
  24. /package/dist/{exceptions.js → src/exceptions.js} +0 -0
  25. /package/dist/{field-triggers.js → src/field-triggers.js} +0 -0
  26. /package/dist/{index.js → src/index.js} +0 -0
  27. /package/dist/{plugins → src/plugins}/index.js +0 -0
  28. /package/dist/{schema-validator.js → src/schema-validator.js} +0 -0
  29. /package/dist/{stores → src/stores}/index.js +0 -0
  30. /package/dist/{types → src/types}/composable.js +0 -0
  31. /package/dist/{types → src/types}/doctype.js +0 -0
  32. /package/dist/{types → src/types}/field-triggers.js +0 -0
  33. /package/dist/{types → src/types}/hst.js +0 -0
  34. /package/dist/{types → src/types}/index.js +0 -0
  35. /package/dist/{types → src/types}/operation-log.js +0 -0
  36. /package/dist/{types → src/types}/plugin.js +0 -0
  37. /package/dist/{types → src/types}/registry.js +0 -0
  38. /package/dist/{types → src/types}/schema-validator.js +0 -0
  39. /package/dist/{types → src/types}/stonecrop.js +0 -0
@@ -1 +1 @@
1
- {"version":"5.9.3"}
1
+ {"version":"6.0.3"}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.57.0"
8
+ "packageVersion": "7.58.7"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/stonecrop",
3
- "version": "0.11.6",
3
+ "version": "0.11.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -34,35 +34,35 @@
34
34
  "pinia-shared-state": "^1.0.1",
35
35
  "pinia-xstate": "^3.0.0",
36
36
  "xstate": "^5.25.0",
37
- "@stonecrop/schema": "0.11.6"
37
+ "@stonecrop/schema": "0.11.8"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "pinia": "^3.0.4",
41
- "vue": "^3.5.28",
42
- "vue-router": "^5.0.2"
41
+ "vue": "^3.5.33",
42
+ "vue-router": "^5.0.6"
43
43
  },
44
44
  "devDependencies": {
45
- "@eslint/js": "^9.39.2",
46
- "@microsoft/api-documenter": "^7.28.2",
47
- "@rushstack/heft": "^1.2.0",
48
- "@vitejs/plugin-vue": "^6.0.3",
49
- "@vitest/coverage-istanbul": "^4.0.18",
50
- "@vue/test-utils": "^2.4.6",
51
- "eslint": "^9.39.2",
45
+ "@eslint/js": "^10.0.1",
46
+ "@microsoft/api-documenter": "^7.30.5",
47
+ "@rushstack/heft": "^1.2.17",
48
+ "@vitejs/plugin-vue": "^6.0.6",
49
+ "@vitest/coverage-istanbul": "^4.1.5",
50
+ "@vue/test-utils": "^2.4.10",
51
+ "eslint": "^10.3.0",
52
52
  "eslint-config-prettier": "^10.1.8",
53
- "eslint-plugin-vue": "^10.6.2",
54
- "globals": "^17.0.0",
55
- "jsdom": "^28.1.0",
56
- "typescript": "^5.9.3",
53
+ "eslint-plugin-vue": "^10.9.0",
54
+ "globals": "^17.6.0",
55
+ "jsdom": "^29.1.1",
56
+ "typescript": "^6.0.3",
57
57
  "pinia": "^3.0.4",
58
- "typescript-eslint": "^8.53.0",
59
- "vue": "^3.5.28",
60
- "vue-router": "^5.0.2",
61
- "vite": "^7.3.1",
62
- "vitest": "^4.0.18",
63
- "@stonecrop/aform": "0.11.6",
58
+ "typescript-eslint": "^8.59.1",
59
+ "vue": "^3.5.33",
60
+ "vue-router": "^5.0.6",
61
+ "vite": "^7.3.2",
62
+ "vitest": "^4.1.5",
63
+ "@stonecrop/atable": "0.11.8",
64
64
  "stonecrop-rig": "0.7.0",
65
- "@stonecrop/atable": "0.11.6"
65
+ "@stonecrop/aform": "0.11.8"
66
66
  },
67
67
  "description": "Schema-driven framework with XState workflows and HST state management",
68
68
  "publishConfig": {
@@ -74,7 +74,7 @@ export function useLazyLink(doctype: Doctype, recordId: string, linkFieldname: s
74
74
  // eslint-disable-next-line @typescript-eslint/no-unsafe-call
75
75
  return await fn(stonecropInstance, getLinkPath(), hstStore)
76
76
  } catch (err) {
77
- throw new Error(`Custom handler failed: ${err instanceof Error ? err.message : String(err)}`)
77
+ throw new Error(`Custom handler failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err })
78
78
  }
79
79
  }
80
80
 
@@ -579,7 +579,7 @@ export function useStonecrop(options?: {
579
579
  return {
580
580
  stonecrop,
581
581
  operationLog,
582
- } as BaseStonecropReturn
582
+ }
583
583
  }
584
584
 
585
585
  /**
@@ -357,7 +357,7 @@ export class FieldTriggerEngine {
357
357
  const regularActionFn = this.globalActions.get(actionName)
358
358
  if (regularActionFn) {
359
359
  // Wrap regular action to accept TransitionChangeContext
360
- actionFn = regularActionFn as unknown as TransitionActionFunction
360
+ actionFn = regularActionFn
361
361
  }
362
362
  }
363
363
 
package/src/registry.ts CHANGED
@@ -196,13 +196,12 @@ export default class Registry {
196
196
  )
197
197
  } else {
198
198
  // One relationship — embed form schema
199
- // TODO: remove assertion once resolved link output has a dedicated type separate from input schema
200
199
  resolvedFields.push({
201
200
  ...fieldRest,
202
201
  label: fieldRest.label || field.fieldname,
203
202
  component: link.component || fieldRest.component || 'AForm',
204
203
  schema: childSchema,
205
- } as SchemaTypes)
204
+ })
206
205
  }
207
206
  } else if ('schema' in field && Array.isArray(field.schema)) {
208
207
  // Fieldset — recursively resolve nested fields
@@ -258,13 +257,12 @@ export default class Registry {
258
257
  )
259
258
  )
260
259
  } else {
261
- // TODO: remove assertion once resolved link output has a dedicated type separate from input schema
262
260
  resolved.push({
263
261
  ...fieldRest,
264
262
  label: fieldRest.label || field.fieldname,
265
263
  component: link.component || fieldRest.component || 'AForm',
266
264
  schema: childSchema,
267
- } as SchemaTypes)
265
+ })
268
266
  }
269
267
  } else if ('schema' in field && Array.isArray(field.schema)) {
270
268
  resolved.push({ ...field, schema: this.resolveFields(field.schema, links, visited) })
package/src/stonecrop.ts CHANGED
@@ -122,7 +122,6 @@ export class Stonecrop {
122
122
 
123
123
  this.registry.addDoctype = (doctype: Doctype) => {
124
124
  // Call original method
125
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
126
125
  originalAddDoctype(doctype)
127
126
 
128
127
  // Auto-create HST store section for new doctype
package/src/stores/hst.ts CHANGED
@@ -153,7 +153,7 @@ class HSTProxy implements HSTNode {
153
153
  return new Proxy(this, {
154
154
  get(hst, prop) {
155
155
  // Return HST methods directly
156
- if (prop in hst) return hst[prop]
156
+ if (prop in hst) return Reflect.get(hst, prop)
157
157
 
158
158
  // Handle property access - return tree nodes for navigation
159
159
  const path = String(prop)
@@ -138,13 +138,15 @@ export const useOperationLogStore = defineStore('hst-operation-log', () => {
138
138
  return operations.value.length - 1 - currentIndex.value
139
139
  })
140
140
 
141
- const undoRedoState = computed<UndoRedoState>(() => ({
142
- canUndo: canUndo.value,
143
- canRedo: canRedo.value,
144
- undoCount: undoCount.value,
145
- redoCount: redoCount.value,
146
- currentIndex: currentIndex.value,
147
- }))
141
+ const undoRedoState = computed(
142
+ (): UndoRedoState => ({
143
+ canUndo: canUndo.value,
144
+ canRedo: canRedo.value,
145
+ undoCount: undoCount.value,
146
+ redoCount: redoCount.value,
147
+ currentIndex: currentIndex.value,
148
+ })
149
+ )
148
150
 
149
151
  // Core Methods
150
152
 
@@ -517,11 +519,11 @@ export const useOperationLogStore = defineStore('hst-operation-log', () => {
517
519
 
518
520
  if (message.type === 'operation' && message.operation) {
519
521
  // Add operation from another tab
520
- operations.value.push({ ...message.operation, source: 'sync' as OperationSource })
522
+ operations.value.push({ ...message.operation, source: 'sync' })
521
523
  currentIndex.value = operations.value.length - 1
522
524
  } else if (message.type === 'operation' && message.operations) {
523
525
  // Add batch operations from another tab
524
- operations.value.push(...message.operations.map(op => ({ ...op, source: 'sync' as OperationSource })))
526
+ operations.value.push(...message.operations.map((op): HSTOperation => ({ ...op, source: 'sync' })))
525
527
  currentIndex.value = operations.value.length - 1
526
528
  }
527
529
  })
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes