@stonecrop/stonecrop 0.11.7 → 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.
- package/dist/{composables → src/composables}/lazy-link.js +1 -1
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/{registry.js → src/registry.js} +0 -2
- package/dist/src/stonecrop.d.ts.map +1 -1
- package/dist/src/stonecrop.js +565 -0
- package/dist/{stores → src/stores}/hst.js +1 -1
- package/dist/src/stores/operation-log.d.ts.map +1 -1
- package/dist/{stores → src/stores}/operation-log.js +1 -1
- package/dist/stonecrop.js +11 -9
- package/dist/stonecrop.js.map +1 -1
- package/dist/stonecrop.tsbuildinfo +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +23 -23
- package/src/composables/lazy-link.ts +1 -1
- package/src/composables/stonecrop.ts +1 -1
- package/src/field-triggers.ts +1 -1
- package/src/registry.ts +2 -4
- package/src/stonecrop.ts +0 -1
- package/src/stores/hst.ts +1 -1
- package/src/stores/operation-log.ts +11 -9
- /package/dist/{composables → src/composables}/operation-log.js +0 -0
- /package/dist/{composables → src/composables}/stonecrop.js +0 -0
- /package/dist/{doctype.js → src/doctype.js} +0 -0
- /package/dist/{exceptions.js → src/exceptions.js} +0 -0
- /package/dist/{field-triggers.js → src/field-triggers.js} +0 -0
- /package/dist/{index.js → src/index.js} +0 -0
- /package/dist/{plugins → src/plugins}/index.js +0 -0
- /package/dist/{schema-validator.js → src/schema-validator.js} +0 -0
- /package/dist/{stores → src/stores}/index.js +0 -0
- /package/dist/{types → src/types}/composable.js +0 -0
- /package/dist/{types → src/types}/doctype.js +0 -0
- /package/dist/{types → src/types}/field-triggers.js +0 -0
- /package/dist/{types → src/types}/hst.js +0 -0
- /package/dist/{types → src/types}/index.js +0 -0
- /package/dist/{types → src/types}/operation-log.js +0 -0
- /package/dist/{types → src/types}/plugin.js +0 -0
- /package/dist/{types → src/types}/registry.js +0 -0
- /package/dist/{types → src/types}/schema-validator.js +0 -0
- /package/dist/{types → src/types}/stonecrop.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"6.0.3"}
|
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/stonecrop",
|
|
3
|
-
"version": "0.11.
|
|
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.
|
|
37
|
+
"@stonecrop/schema": "0.11.8"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"pinia": "^3.0.4",
|
|
41
|
-
"vue": "^3.5.
|
|
42
|
-
"vue-router": "^5.0.
|
|
41
|
+
"vue": "^3.5.33",
|
|
42
|
+
"vue-router": "^5.0.6"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@eslint/js": "^
|
|
46
|
-
"@microsoft/api-documenter": "^7.
|
|
47
|
-
"@rushstack/heft": "^1.2.
|
|
48
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
49
|
-
"@vitest/coverage-istanbul": "^4.
|
|
50
|
-
"@vue/test-utils": "^2.4.
|
|
51
|
-
"eslint": "^
|
|
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.
|
|
54
|
-
"globals": "^17.
|
|
55
|
-
"jsdom": "^
|
|
56
|
-
"typescript": "^
|
|
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.
|
|
59
|
-
"vue": "^3.5.
|
|
60
|
-
"vue-router": "^5.0.
|
|
61
|
-
"vite": "^7.3.
|
|
62
|
-
"vitest": "^4.
|
|
63
|
-
"@stonecrop/atable": "0.11.
|
|
64
|
-
"
|
|
65
|
-
"stonecrop
|
|
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
|
+
"stonecrop-rig": "0.7.0",
|
|
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
|
|
package/src/field-triggers.ts
CHANGED
|
@@ -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
|
|
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
|
-
}
|
|
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
|
-
}
|
|
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
|
|
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
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
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'
|
|
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'
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|