@stonecrop/stonecrop 0.11.8 → 0.11.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/stonecrop",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
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.11.8"
37
+ "@stonecrop/schema": "0.11.9"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "pinia": "^3.0.4",
@@ -60,9 +60,9 @@
60
60
  "vue-router": "^5.0.6",
61
61
  "vite": "^7.3.2",
62
62
  "vitest": "^4.1.5",
63
- "@stonecrop/atable": "0.11.8",
63
+ "@stonecrop/aform": "0.11.9",
64
64
  "stonecrop-rig": "0.7.0",
65
- "@stonecrop/aform": "0.11.8"
65
+ "@stonecrop/atable": "0.11.9"
66
66
  },
67
67
  "description": "Schema-driven framework with XState workflows and HST state management",
68
68
  "publishConfig": {
package/src/registry.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { SchemaTypes, TableSchema } from '@stonecrop/aform'
2
- import type { LinkDeclaration } from '@stonecrop/schema'
2
+ import type { FieldMeta, LinkDeclaration } from '@stonecrop/schema'
3
3
  import { Router } from 'vue-router'
4
4
 
5
5
  import Doctype from './doctype'
@@ -161,8 +161,13 @@ export default class Registry {
161
161
  if ('fieldtype' in field && field.fieldtype === 'Link') {
162
162
  const link = linksByFieldname.get(field.fieldname)
163
163
  if (!link) {
164
- // Link field without corresponding link declaration - copy as-is
165
- resolvedFields.push({ ...field })
164
+ const doctype =
165
+ typeof (field as FieldMeta).options === 'string' ? ((field as FieldMeta).options as string) : undefined
166
+ resolvedFields.push({
167
+ ...field,
168
+ component: 'AFormLink',
169
+ ...(doctype !== undefined ? { doctype } : {}),
170
+ })
166
171
  continue
167
172
  }
168
173
 
@@ -1,5 +1,5 @@
1
1
  import type { SchemaTypes } from '@stonecrop/aform'
2
- import type { LinkDeclaration, WorkflowMeta } from '@stonecrop/schema'
2
+ import type { FieldMeta, LinkDeclaration, WorkflowMeta } from '@stonecrop/schema'
3
3
  import { List, Map } from 'immutable'
4
4
  import type { AnyStateNodeConfig, UnknownMachineConfig } from 'xstate'
5
5
 
@@ -47,7 +47,7 @@ export type DoctypeConfig = {
47
47
  /** Database table name */
48
48
  tableName?: string
49
49
  /** Field definitions (including link fields with fieldtype: 'Link') */
50
- fields?: SchemaTypes[]
50
+ fields?: (SchemaTypes | FieldMeta)[]
51
51
  /** Relationship links to other doctypes */
52
52
  links?: Record<string, LinkDeclaration>
53
53
  /** Workflow configuration (XState format or simple WorkflowMeta) */