@stonecrop/stonecrop 0.11.10 → 0.12.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/dist/src/registry.d.ts.map +1 -1
- package/dist/src/registry.js +4 -16
- package/dist/src/stonecrop.js +1 -1
- package/dist/stonecrop.js +239 -245
- package/dist/stonecrop.js.map +1 -1
- package/package.json +5 -5
- package/src/registry.ts +4 -17
- package/src/stonecrop.ts +1 -1
- package/src/stores/hst.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/stonecrop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -34,7 +34,7 @@
|
|
|
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.
|
|
37
|
+
"@stonecrop/schema": "0.12.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"pinia": "^3.0.4",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"vue-router": "^5.0.6",
|
|
61
61
|
"vite": "^7.3.2",
|
|
62
62
|
"vitest": "^4.1.5",
|
|
63
|
-
"@stonecrop/aform": "0.
|
|
64
|
-
"@stonecrop/atable": "0.
|
|
63
|
+
"@stonecrop/aform": "0.12.1",
|
|
64
|
+
"@stonecrop/atable": "0.12.1",
|
|
65
65
|
"stonecrop-rig": "0.7.0"
|
|
66
66
|
},
|
|
67
67
|
"description": "Schema-driven framework with XState workflows and HST state management",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
71
|
"engines": {
|
|
72
|
-
"node": ">=
|
|
72
|
+
"node": ">=24.0.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"_phase:build": "heft build && vite build && rushx docs",
|
package/src/registry.ts
CHANGED
|
@@ -288,23 +288,11 @@ export default class Registry {
|
|
|
288
288
|
...field,
|
|
289
289
|
fieldname: field.fieldname,
|
|
290
290
|
component: component || field.component || 'ATable',
|
|
291
|
-
|
|
291
|
+
kind: 'table',
|
|
292
|
+
schema: childSchema,
|
|
292
293
|
config: field.config,
|
|
293
294
|
}
|
|
294
295
|
|
|
295
|
-
if (!resolved.columns) {
|
|
296
|
-
resolved.columns = childSchema
|
|
297
|
-
.filter(childField => 'fieldtype' in childField)
|
|
298
|
-
.map(childField => ({
|
|
299
|
-
name: childField.fieldname,
|
|
300
|
-
label: ('label' in childField && childField.label) || childField.fieldname,
|
|
301
|
-
fieldtype: 'fieldtype' in childField ? childField.fieldtype : 'Data',
|
|
302
|
-
align: 'align' in childField ? childField.align : 'left',
|
|
303
|
-
edit: 'edit' in childField ? childField.edit : true,
|
|
304
|
-
width: ('width' in childField && childField.width) || '20ch',
|
|
305
|
-
}))
|
|
306
|
-
}
|
|
307
|
-
|
|
308
296
|
if (!resolved.config) {
|
|
309
297
|
resolved.config = { view: 'list' }
|
|
310
298
|
}
|
|
@@ -353,9 +341,8 @@ export default class Registry {
|
|
|
353
341
|
return
|
|
354
342
|
}
|
|
355
343
|
|
|
356
|
-
// Resolved 1:many table entry —
|
|
357
|
-
|
|
358
|
-
if ('columns' in field) {
|
|
344
|
+
// Resolved 1:many table entry — kind discriminant set by buildTableConfig
|
|
345
|
+
if ('kind' in field && field.kind === 'table') {
|
|
359
346
|
record[field.fieldname] = []
|
|
360
347
|
return
|
|
361
348
|
}
|
package/src/stonecrop.ts
CHANGED
|
@@ -485,7 +485,7 @@ export class Stonecrop {
|
|
|
485
485
|
initialState =
|
|
486
486
|
typeof (workflow as { initial?: unknown }).initial === 'string'
|
|
487
487
|
? (workflow as { initial: string }).initial
|
|
488
|
-
: Object.keys(workflow.states ?? {})[0] ?? ''
|
|
488
|
+
: (Object.keys(workflow.states ?? {})[0] ?? '')
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
return status || initialState
|
package/src/stores/hst.ts
CHANGED
|
@@ -590,7 +590,7 @@ class HSTProxy implements HSTNode {
|
|
|
590
590
|
|
|
591
591
|
return Boolean(
|
|
592
592
|
(hasGetMethod && hasSetMethod && hasHasMethod && hasImmutableMarkers) ||
|
|
593
|
-
|
|
593
|
+
(hasGetMethod && hasSetMethod && isImmutableConstructor)
|
|
594
594
|
)
|
|
595
595
|
}
|
|
596
596
|
|