fimo 2.4.1 → 2.5.0-staging.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/assets/astro/components/Boolean.astro +2 -1
- package/assets/astro/components/Date.astro +2 -1
- package/assets/astro/components/DateTime.astro +2 -1
- package/assets/astro/components/Image.astro +3 -2
- package/assets/astro/components/Json.astro +2 -1
- package/assets/astro/components/RichText.astro +2 -1
- package/assets/astro/components/StaticImage.astro +2 -1
- package/assets/astro/components/Text.astro +3 -2
- package/assets/astro/components/Video.astro +3 -2
- package/assets/skills/fimo-cli/references/analytics.md +32 -2
- package/assets/skills/fimo-studio/references/cms.md +2 -0
- package/dist/build/vite/plugins/runtime-env.js +13 -5
- package/dist/cli/bundle.json +2 -2
- package/dist/cli/index.js +4 -4
- package/dist/runtime/preview/editing-metadata.d.ts +8 -0
- package/dist/runtime/preview/editing-metadata.js +31 -0
- package/dist/runtime/preview/index.d.ts +1 -0
- package/dist/runtime/preview/index.js +1 -0
- package/package.json +8 -8
- package/release.json +2 -2
- package/templates/astro/package.json +2 -2
- package/templates/nextjs/package.json +3 -3
- package/templates/react-router/package.json +4 -4
- package/templates/sveltekit/package.json +2 -2
- package/templates/vite/package.json +4 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** FIMO-2546: Branch names and preview script URLs are not deployment modes. */
|
|
2
|
+
export declare function resolveFimoEditingMetadata(mode: string | undefined, override?: string): boolean;
|
|
3
|
+
/** Framework adapters compile this decision into both browser and server output. */
|
|
4
|
+
export declare function isFimoEditingMetadataEnabled(): boolean;
|
|
5
|
+
export declare const FIMO_EDITING_ATTRIBUTES: Set<string>;
|
|
6
|
+
/** Filter only editing props, preserving normal ids and analytics attributes. */
|
|
7
|
+
export declare function withoutFimoEditingMetadata<T extends object>(props: T): T;
|
|
8
|
+
//# sourceMappingURL=editing-metadata.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** FIMO-2546: Branch names and preview script URLs are not deployment modes. */
|
|
2
|
+
export function resolveFimoEditingMetadata(mode, override) {
|
|
3
|
+
return override === undefined ? mode === 'development' : override === 'true';
|
|
4
|
+
}
|
|
5
|
+
/** Framework adapters compile this decision into both browser and server output. */
|
|
6
|
+
export function isFimoEditingMetadataEnabled() {
|
|
7
|
+
try {
|
|
8
|
+
if (process.env.FIMO_EDITING_METADATA !== undefined) {
|
|
9
|
+
return process.env.FIMO_EDITING_METADATA === 'true';
|
|
10
|
+
}
|
|
11
|
+
return resolveFimoEditingMetadata(process.env.NODE_ENV);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
// Unconfigured browser runtimes have no process global. Fail closed.
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export const FIMO_EDITING_ATTRIBUTES = new Set([
|
|
19
|
+
'data-fimo-source',
|
|
20
|
+
'data-fimo-source-context',
|
|
21
|
+
'data-fimo-id',
|
|
22
|
+
'data-fimo-richtext',
|
|
23
|
+
'data-fimo-live-edit',
|
|
24
|
+
]);
|
|
25
|
+
/** Filter only editing props, preserving normal ids and analytics attributes. */
|
|
26
|
+
export function withoutFimoEditingMetadata(props) {
|
|
27
|
+
if (isFimoEditingMetadataEnabled()) {
|
|
28
|
+
return props;
|
|
29
|
+
}
|
|
30
|
+
return Object.fromEntries(Object.entries(props).filter(([key]) => !FIMO_EDITING_ATTRIBUTES.has(key)));
|
|
31
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { getSafePreviewNavigationPath, isPreviewRuntimeEnabled } from './bridge.js';
|
|
2
|
+
export { resolveFimoEditingMetadata, isFimoEditingMetadataEnabled, withoutFimoEditingMetadata, FIMO_EDITING_ATTRIBUTES, } from './editing-metadata.js';
|
|
2
3
|
export { getPreviewLocationChange, getPreviewLocationPath, getPreviewParentOrigin, getDocumentLocale, resolvePreviewParentOrigin, type PreviewBrowserContext, type PreviewLocationChange, type PreviewLocationLike, } from './location.js';
|
|
3
4
|
export { ensurePreviewScript } from './script.js';
|
|
4
5
|
export { getConfigPreviewRoutes, type PreviewRoute } from './routes.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { getSafePreviewNavigationPath, isPreviewRuntimeEnabled } from './bridge.js';
|
|
2
|
+
export { resolveFimoEditingMetadata, isFimoEditingMetadataEnabled, withoutFimoEditingMetadata, FIMO_EDITING_ATTRIBUTES, } from './editing-metadata.js';
|
|
2
3
|
export { getPreviewLocationChange, getPreviewLocationPath, getPreviewParentOrigin, getDocumentLocale, resolvePreviewParentOrigin, } from './location.js';
|
|
3
4
|
export { ensurePreviewScript } from './script.js';
|
|
4
5
|
export { getConfigPreviewRoutes } from './routes.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fimo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-staging.1",
|
|
4
4
|
"description": "Fimo CLI - create, deploy, and manage Fimo projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-component"
|
|
@@ -193,13 +193,13 @@
|
|
|
193
193
|
"devDependencies": {
|
|
194
194
|
"@clack/core": "^1.2.0",
|
|
195
195
|
"@clack/prompts": "^1.2.0",
|
|
196
|
-
"@fimo/agents-bundle": "2.
|
|
197
|
-
"@fimo/api-contracts": "2.
|
|
198
|
-
"@fimo/cli-kit": "2.
|
|
199
|
-
"@fimo/framework-detect": "2.
|
|
200
|
-
"@fimo/routes": "2.
|
|
201
|
-
"@fimo/sdk": "2.
|
|
202
|
-
"@fimo/tsconfig": "2.
|
|
196
|
+
"@fimo/agents-bundle": "2.5.0-staging.1",
|
|
197
|
+
"@fimo/api-contracts": "2.5.0-staging.1",
|
|
198
|
+
"@fimo/cli-kit": "2.5.0-staging.1",
|
|
199
|
+
"@fimo/framework-detect": "2.5.0-staging.1",
|
|
200
|
+
"@fimo/routes": "2.5.0-staging.1",
|
|
201
|
+
"@fimo/sdk": "2.5.0-staging.1",
|
|
202
|
+
"@fimo/tsconfig": "2.5.0-staging.1",
|
|
203
203
|
"@types/node": "22.18.6",
|
|
204
204
|
"agent-install": "^0.0.5",
|
|
205
205
|
"astro": "^7.1.6",
|
package/release.json
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@tanstack/react-query": "^5.80.6",
|
|
15
|
-
"fimo": "2.
|
|
16
|
-
"fimo-next": "2.
|
|
17
|
-
"fimo-react": "2.
|
|
15
|
+
"fimo": "2.5.0-staging.1",
|
|
16
|
+
"fimo-next": "2.5.0-staging.1",
|
|
17
|
+
"fimo-react": "2.5.0-staging.1",
|
|
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
|
"cn": "0.2.4",
|
|
22
22
|
"date-fns": "^4.1.0",
|
|
23
23
|
"embla-carousel-react": "^8.6.0",
|
|
24
|
-
"fimo": "2.
|
|
25
|
-
"fimo-react": "2.
|
|
26
|
-
"fimo-react-router": "2.
|
|
27
|
-
"fimo-vite": "2.
|
|
24
|
+
"fimo": "2.5.0-staging.1",
|
|
25
|
+
"fimo-react": "2.5.0-staging.1",
|
|
26
|
+
"fimo-react-router": "2.5.0-staging.1",
|
|
27
|
+
"fimo-vite": "2.5.0-staging.1",
|
|
28
28
|
"input-otp": "^1.4.2",
|
|
29
29
|
"isbot": "^5",
|
|
30
30
|
"lucide-react": "^0.577.0",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@tanstack/react-query": "^5.80.6",
|
|
14
|
-
"fimo": "2.
|
|
15
|
-
"fimo-react": "2.
|
|
16
|
-
"fimo-react-router": "2.
|
|
17
|
-
"fimo-vite": "2.
|
|
14
|
+
"fimo": "2.5.0-staging.1",
|
|
15
|
+
"fimo-react": "2.5.0-staging.1",
|
|
16
|
+
"fimo-react-router": "2.5.0-staging.1",
|
|
17
|
+
"fimo-vite": "2.5.0-staging.1",
|
|
18
18
|
"react": "^19.2.7",
|
|
19
19
|
"react-dom": "^19.2.7",
|
|
20
20
|
"react-router": "^8.3.0"
|