fimo 2.2.0-staging.12 → 2.2.0-staging.13

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.
@@ -1,9 +1,10 @@
1
1
  import { FimoBoolean, FimoDate, FimoMedia, FimoRichText, FimoString, type FimoRichTextContent } from '../primitives/lib/primitives.js';
2
2
  export interface SerializedMedia {
3
+ id?: string;
3
4
  url: string;
4
- alt: string;
5
- name: string;
6
- mime: string;
5
+ alt?: string;
6
+ name?: string;
7
+ mime?: string;
7
8
  width?: number;
8
9
  height?: number;
9
10
  }
@@ -18,10 +18,11 @@ export function serializeContent(value) {
18
18
  }
19
19
  if (value instanceof FimoMedia) {
20
20
  const media = {
21
+ ...(value.id === undefined ? {} : { id: value.id }),
21
22
  url: value.url,
22
- alt: value.alt,
23
- name: value.name,
24
- mime: value.mime,
23
+ ...(value.alt === undefined ? {} : { alt: value.alt }),
24
+ ...(value.name === undefined ? {} : { name: value.name }),
25
+ ...(value.mime === undefined ? {} : { mime: value.mime }),
25
26
  ...(value.width === undefined ? {} : { width: value.width }),
26
27
  ...(value.height === undefined ? {} : { height: value.height }),
27
28
  };
@@ -68,22 +68,30 @@ export declare class FimoDate extends Date {
68
68
  get __fimo(): FimoSource;
69
69
  }
70
70
  /**
71
- * FimoMedia - Media object with source tracking
71
+ * FimoMedia - a media value with source tracking.
72
+ *
73
+ * A stored media value is a reference: the media-library `id`, the `url` that
74
+ * still resolves if the asset is deleted, and the `alt` the entry owns. The
75
+ * facts the asset owns, such as `name`, `mime`, and intrinsic `width`/`height`,
76
+ * are optional because a read only carries them when it named the field in
77
+ * `populate`. Renderers must treat them as enrichment.
72
78
  */
73
79
  export declare class FimoMedia {
80
+ readonly id?: string;
74
81
  readonly url: string;
75
- readonly alt: string;
76
- readonly name: string;
77
- readonly mime: string;
82
+ readonly alt?: string;
83
+ readonly name?: string;
84
+ readonly mime?: string;
78
85
  readonly width?: number;
79
86
  readonly height?: number;
80
87
  readonly [FIMO_SOURCE]: string;
81
88
  readonly [FIMO_SOURCE_CONTEXT]?: FimoSourceContext;
82
89
  constructor(data: {
90
+ id?: string;
83
91
  url: string;
84
- alt: string;
85
- name: string;
86
- mime: string;
92
+ alt?: string;
93
+ name?: string;
94
+ mime?: string;
87
95
  width?: number;
88
96
  height?: number;
89
97
  }, source: string, context?: FimoSourceContext);
@@ -100,10 +100,22 @@ export class FimoDate extends Date {
100
100
  }
101
101
  _d = FIMO_SOURCE, _e = FIMO_SOURCE_CONTEXT;
102
102
  /**
103
- * FimoMedia - Media object with source tracking
103
+ * FimoMedia - a media value with source tracking.
104
+ *
105
+ * A stored media value is a reference: the media-library `id`, the `url` that
106
+ * still resolves if the asset is deleted, and the `alt` the entry owns. The
107
+ * facts the asset owns, such as `name`, `mime`, and intrinsic `width`/`height`,
108
+ * are optional because a read only carries them when it named the field in
109
+ * `populate`. Renderers must treat them as enrichment.
104
110
  */
105
111
  export class FimoMedia {
106
112
  constructor(data, source, context) {
113
+ Object.defineProperty(this, "id", {
114
+ enumerable: true,
115
+ configurable: true,
116
+ writable: true,
117
+ value: void 0
118
+ });
107
119
  Object.defineProperty(this, "url", {
108
120
  enumerable: true,
109
121
  configurable: true,
@@ -152,6 +164,7 @@ export class FimoMedia {
152
164
  writable: true,
153
165
  value: void 0
154
166
  });
167
+ this.id = data.id;
155
168
  this.url = data.url;
156
169
  this.alt = data.alt;
157
170
  this.name = data.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "2.2.0-staging.12",
3
+ "version": "2.2.0-staging.13",
4
4
  "description": "Fimo CLI - create, deploy, and manage Fimo projects",
5
5
  "keywords": [
6
6
  "astro-component"
@@ -189,12 +189,12 @@
189
189
  "devDependencies": {
190
190
  "@clack/core": "^1.2.0",
191
191
  "@clack/prompts": "^1.2.0",
192
- "@fimo/agents-bundle": "2.2.0-staging.12",
193
- "@fimo/api-contracts": "2.2.0-staging.12",
194
- "@fimo/cli-kit": "2.2.0-staging.12",
195
- "@fimo/framework-detect": "2.2.0-staging.12",
196
- "@fimo/routes": "2.2.0-staging.12",
197
- "@fimo/tsconfig": "2.2.0-staging.12",
192
+ "@fimo/agents-bundle": "2.2.0-staging.13",
193
+ "@fimo/api-contracts": "2.2.0-staging.13",
194
+ "@fimo/cli-kit": "2.2.0-staging.13",
195
+ "@fimo/framework-detect": "2.2.0-staging.13",
196
+ "@fimo/routes": "2.2.0-staging.13",
197
+ "@fimo/tsconfig": "2.2.0-staging.13",
198
198
  "@types/node": "22.18.6",
199
199
  "agent-install": "^0.0.5",
200
200
  "astro": "^7.1.6",
@@ -9,8 +9,8 @@
9
9
  "check": "astro sync && astro check"
10
10
  },
11
11
  "dependencies": {
12
- "fimo": "2.2.0-staging.12",
13
- "fimo-astro": "2.2.0-staging.12"
12
+ "fimo": "2.2.0-staging.13",
13
+ "fimo-astro": "2.2.0-staging.13"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@astrojs/check": "^0.9.10",
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@tanstack/react-query": "^5.80.6",
15
- "fimo": "2.2.0-staging.12",
16
- "fimo-next": "2.2.0-staging.12",
17
- "fimo-react": "2.2.0-staging.12",
15
+ "fimo": "2.2.0-staging.13",
16
+ "fimo-next": "2.2.0-staging.13",
17
+ "fimo-react": "2.2.0-staging.13",
18
18
  "next": "^16.3.3",
19
19
  "react": "^19.2.7",
20
20
  "react-dom": "^19.2.7"
@@ -21,10 +21,10 @@
21
21
  "cmdk": "^1.1.1",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "2.2.0-staging.12",
25
- "fimo-react": "2.2.0-staging.12",
26
- "fimo-react-router": "2.2.0-staging.12",
27
- "fimo-vite": "2.2.0-staging.12",
24
+ "fimo": "2.2.0-staging.13",
25
+ "fimo-react": "2.2.0-staging.13",
26
+ "fimo-react-router": "2.2.0-staging.13",
27
+ "fimo-vite": "2.2.0-staging.13",
28
28
  "input-otp": "^1.4.2",
29
29
  "isbot": "^5",
30
30
  "lucide-react": "^0.577.0",
@@ -11,8 +11,8 @@
11
11
  "prepare": "svelte-kit sync"
12
12
  },
13
13
  "dependencies": {
14
- "fimo": "2.2.0-staging.12",
15
- "fimo-sveltekit": "2.2.0-staging.12"
14
+ "fimo": "2.2.0-staging.13",
15
+ "fimo-sveltekit": "2.2.0-staging.13"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@sveltejs/kit": "^2.70.2",
@@ -11,10 +11,10 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@tanstack/react-query": "^5.80.6",
14
- "fimo": "2.2.0-staging.12",
15
- "fimo-react": "2.2.0-staging.12",
16
- "fimo-react-router": "2.2.0-staging.12",
17
- "fimo-vite": "2.2.0-staging.12",
14
+ "fimo": "2.2.0-staging.13",
15
+ "fimo-react": "2.2.0-staging.13",
16
+ "fimo-react-router": "2.2.0-staging.13",
17
+ "fimo-vite": "2.2.0-staging.13",
18
18
  "react": "^19.2.7",
19
19
  "react-dom": "^19.2.7",
20
20
  "react-router": "^8.3.0"