@stonecrop/stonecrop 0.12.4 → 0.12.6
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 +10 -2
- package/dist/stonecrop.js +119 -115
- package/dist/stonecrop.js.map +1 -1
- package/package.json +5 -5
- package/src/registry.ts +19 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/stonecrop",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
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.12.
|
|
37
|
+
"@stonecrop/schema": "0.12.6"
|
|
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.12.
|
|
64
|
-
"
|
|
65
|
-
"stonecrop
|
|
63
|
+
"@stonecrop/atable": "0.12.6",
|
|
64
|
+
"stonecrop-rig": "0.7.0",
|
|
65
|
+
"@stonecrop/aform": "0.12.6"
|
|
66
66
|
},
|
|
67
67
|
"description": "Schema-driven framework with XState workflows and HST state management",
|
|
68
68
|
"publishConfig": {
|
package/src/registry.ts
CHANGED
|
@@ -163,11 +163,28 @@ export default class Registry {
|
|
|
163
163
|
if (!link) {
|
|
164
164
|
const doctype =
|
|
165
165
|
typeof (field as FieldMeta).options === 'string' ? ((field as FieldMeta).options as string) : undefined
|
|
166
|
+
|
|
167
|
+
if (doctype === undefined) {
|
|
168
|
+
// eslint-disable-next-line no-console
|
|
169
|
+
console.warn(
|
|
170
|
+
`[Stonecrop] Link field "${field.fieldname}" has no \`options\` or corresponding \`links\` declaration. ` +
|
|
171
|
+
`AFormLink will be created without a \`doctype\` prop, so navigation will not work. ` +
|
|
172
|
+
`Add \`"options": "<doctype-slug>"\` to the field definition.`
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Strip any raw `doctype` from the JSON; only `options` is the authoritative source.
|
|
177
|
+
const { doctype: _rawDoctype, ...fieldRest } = field as typeof field & {
|
|
178
|
+
doctype?: unknown
|
|
179
|
+
component?: string
|
|
180
|
+
}
|
|
181
|
+
|
|
166
182
|
resolvedFields.push({
|
|
167
|
-
...
|
|
168
|
-
component: 'AFormLink',
|
|
183
|
+
...fieldRest,
|
|
184
|
+
component: fieldRest.component || 'AFormLink',
|
|
169
185
|
...(doctype !== undefined ? { doctype } : {}),
|
|
170
186
|
})
|
|
187
|
+
|
|
171
188
|
continue
|
|
172
189
|
}
|
|
173
190
|
|