@avocadostudio-ai/migration-sdk 0.3.2 → 0.4.0

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.
@@ -49,6 +49,8 @@ function fieldMetaCall(field) {
49
49
  return `f.richtext(${JSON.stringify(field.label)})`;
50
50
  case "url":
51
51
  return `f.url(${JSON.stringify(field.label)})`;
52
+ case "link":
53
+ return `f.link(${JSON.stringify(field.label)})`;
52
54
  case "image": {
53
55
  if (field.imageSpec) {
54
56
  return `f.image(${JSON.stringify(field.label)}, ${JSON.stringify(field.imageSpec)})`;
package/dist/types.d.ts CHANGED
@@ -37,7 +37,11 @@ export type DesignTokens = {
37
37
  };
38
38
  /** Maps to the site's CSS custom properties (--bg-0, --brand, etc.) */
39
39
  export type ThemeVariables = Record<string, string>;
40
- export type FieldKind = "text" | "richtext" | "url" | "image" | "imageAlt" | "color" | "enum" | "number";
40
+ export type FieldKind = "text" | "richtext"
41
+ /** A resource address — an iframe src, a video file. Never an internal page. */
42
+ | "url"
43
+ /** A navigation target: an internal page, or an external URL / mailto / tel. */
44
+ | "link" | "image" | "imageAlt" | "color" | "enum" | "number";
41
45
  export type FieldSpec = {
42
46
  name: string;
43
47
  kind: FieldKind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avocadostudio-ai/migration-sdk",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@avocadostudio-ai/shared": "^0.3.2"
20
+ "@avocadostudio-ai/shared": "^0.4.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^22.13.10",