fimo 0.12.0-staging.1 → 0.12.0-staging.3
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/skills/fimo/SKILL.md +7 -5
- package/assets/skills/fimo-cli/SKILL.md +8 -16
- package/assets/skills/fimo-cli/references/agent-setup.md +13 -13
- package/assets/skills/fimo-cli/references/assets.md +2 -2
- package/assets/skills/fimo-cli/references/content.md +10 -10
- package/assets/skills/fimo-cli/references/forms.md +6 -6
- package/assets/skills/fimo-cli/references/init.md +1 -1
- package/assets/skills/fimo-cli/references/labels.md +3 -3
- package/assets/skills/fimo-cli/references/locales.md +1 -1
- package/assets/skills/fimo-code/SKILL.md +2 -2
- package/assets/skills/fimo-studio/SKILL.md +3 -1
- package/assets/skills/fimo-studio/references/ai-chat.md +1 -1
- package/assets/skills/fimo-studio/references/command-palette.md +31 -0
- package/dist/build/vite/plugins/content-sync.js +1 -1
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +167 -58
- package/dist/runtime/labels/core.d.ts +18 -0
- package/dist/runtime/labels/core.js +15 -0
- package/dist/runtime/labels/fetch.d.ts +7 -0
- package/dist/runtime/labels/fetch.js +41 -0
- package/dist/runtime/next/client.d.ts +11 -3
- package/dist/runtime/next/client.js +9 -2
- package/dist/runtime/next/facade.d.ts +8 -0
- package/dist/runtime/next/facade.js +34 -0
- package/dist/runtime/next/labels.d.ts +7 -0
- package/dist/runtime/next/labels.js +9 -0
- package/dist/runtime/next/{Text.d.ts → primitives/Text.d.ts} +1 -1
- package/dist/runtime/next/{Text.js → primitives/Text.js} +1 -1
- package/dist/runtime/next/primitives/server.d.ts +9 -0
- package/dist/runtime/next/primitives/server.js +46 -0
- package/dist/runtime/next/provider.d.ts +5 -2
- package/dist/runtime/next/provider.js +18 -5
- package/dist/runtime/next/server.d.ts +8 -1
- package/dist/runtime/next/server.js +5 -1
- package/dist/runtime/primitives/index.d.ts +10 -10
- package/dist/runtime/primitives/index.js +10 -10
- package/dist/runtime/primitives/lib/image-optimization.d.ts +10 -1
- package/dist/runtime/primitives/lib/image-optimization.js +12 -12
- package/dist/runtime/primitives/lib/index.d.ts +0 -1
- package/dist/runtime/primitives/lib/index.js +0 -1
- package/dist/runtime/react/primitives/contracts.d.ts +56 -0
- package/dist/runtime/react/primitives/contracts.js +1 -0
- package/dist/runtime/react/primitives/editable/Boolean.d.ts +5 -0
- package/dist/runtime/react/primitives/editable/Boolean.js +11 -0
- package/dist/runtime/react/primitives/editable/Date.d.ts +4 -0
- package/dist/runtime/react/primitives/editable/Date.js +12 -0
- package/dist/runtime/react/primitives/editable/Image.d.ts +4 -0
- package/dist/runtime/react/primitives/editable/Image.js +10 -0
- package/dist/runtime/react/primitives/editable/Json.d.ts +5 -0
- package/dist/runtime/react/primitives/editable/Json.js +11 -0
- package/dist/runtime/react/primitives/editable/RichText.d.ts +4 -0
- package/dist/runtime/react/primitives/editable/RichText.js +11 -0
- package/dist/runtime/{primitives/components → react/primitives/editable}/Text.d.ts +3 -6
- package/dist/runtime/{primitives/components → react/primitives/editable}/Text.js +2 -1
- package/dist/runtime/react/primitives/editable/Video.d.ts +4 -0
- package/dist/runtime/react/primitives/editable/Video.js +10 -0
- package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +11 -0
- package/dist/runtime/react/primitives/renderers/DateRenderer.js +14 -0
- package/dist/runtime/react/primitives/renderers/ImageRenderer.d.ts +8 -0
- package/dist/runtime/react/primitives/renderers/ImageRenderer.js +50 -0
- package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +11 -0
- package/dist/runtime/{primitives/components/RichText.js → react/primitives/renderers/RichTextRenderer.js} +4 -6
- package/dist/runtime/{primitives/components → react/primitives/renderers}/StaticImage.d.ts +2 -11
- package/dist/runtime/{primitives/components → react/primitives/renderers}/StaticImage.js +5 -3
- package/dist/runtime/react/primitives/renderers/VideoRenderer.d.ts +8 -0
- package/dist/runtime/react/primitives/renderers/VideoRenderer.js +10 -0
- package/dist/runtime/{primitives/lib → react}/useFimoLiveValue.d.ts +3 -3
- package/dist/runtime/{primitives/lib → react}/useFimoLiveValue.js +3 -3
- package/dist/runtime/vite/primitives/Images.d.ts +4 -0
- package/dist/runtime/vite/primitives/Images.js +12 -0
- package/dist/runtime/{primitives → vite}/translations.d.ts +1 -1
- package/dist/runtime/{primitives → vite}/translations.js +1 -1
- package/dist/scripts/sync-schemas.d.ts +2 -1
- package/dist/scripts/sync-schemas.js +119 -67
- package/package.json +2 -1
- package/templates/react-router/AGENTS.md +4 -2
- package/templates/react-router/package.json +1 -1
- package/dist/runtime/primitives/components/Boolean.d.ts +0 -29
- package/dist/runtime/primitives/components/Boolean.js +0 -33
- package/dist/runtime/primitives/components/Date.d.ts +0 -30
- package/dist/runtime/primitives/components/Date.js +0 -43
- package/dist/runtime/primitives/components/Image.d.ts +0 -72
- package/dist/runtime/primitives/components/Image.js +0 -108
- package/dist/runtime/primitives/components/Json.d.ts +0 -25
- package/dist/runtime/primitives/components/Json.js +0 -29
- package/dist/runtime/primitives/components/RichText.d.ts +0 -9
- package/dist/runtime/primitives/components/Video.d.ts +0 -31
- package/dist/runtime/primitives/components/Video.js +0 -34
- package/dist/runtime/primitives/components/index.d.ts +0 -6
- package/dist/runtime/primitives/components/index.js +0 -5
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type ElementType, type ReactNode } from 'react';
|
|
2
|
-
type JsonProps<T extends ElementType = 'span'> = {
|
|
3
|
-
value: unknown;
|
|
4
|
-
as?: T;
|
|
5
|
-
children?: (value: unknown) => ReactNode;
|
|
6
|
-
} & Omit<ComponentPropsWithoutRef<T>, 'value' | 'as' | 'children'>;
|
|
7
|
-
/**
|
|
8
|
-
* Json component for rendering JSON field values with source tracking.
|
|
9
|
-
*
|
|
10
|
-
* Use children render function to customize how the value is displayed.
|
|
11
|
-
* Pass `as="pre"` (with a `white-space: pre-wrap` class) for formatted output.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* // Default (single-line JSON text)
|
|
15
|
-
* <Json value={product.metadata} />
|
|
16
|
-
*
|
|
17
|
-
* // Pretty-printed
|
|
18
|
-
* <Json value={product.metadata} as="pre" className="whitespace-pre-wrap" />
|
|
19
|
-
*
|
|
20
|
-
* // With render function for custom display
|
|
21
|
-
* <Json value={product.metadata}>{(val) => val.tags?.join(', ')}</Json>
|
|
22
|
-
*/
|
|
23
|
-
export declare function Json<T extends ElementType = 'span'>({ value, as, children, ...props }: JsonProps<T>): import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
-
export {};
|
|
25
|
-
//# sourceMappingURL=Json.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { getFimoSource, useFimoLiveValue } from '../lib/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Json component for rendering JSON field values with source tracking.
|
|
5
|
-
*
|
|
6
|
-
* Use children render function to customize how the value is displayed.
|
|
7
|
-
* Pass `as="pre"` (with a `white-space: pre-wrap` class) for formatted output.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* // Default (single-line JSON text)
|
|
11
|
-
* <Json value={product.metadata} />
|
|
12
|
-
*
|
|
13
|
-
* // Pretty-printed
|
|
14
|
-
* <Json value={product.metadata} as="pre" className="whitespace-pre-wrap" />
|
|
15
|
-
*
|
|
16
|
-
* // With render function for custom display
|
|
17
|
-
* <Json value={product.metadata}>{(val) => val.tags?.join(', ')}</Json>
|
|
18
|
-
*/
|
|
19
|
-
export function Json({ value, as, children, ...props }) {
|
|
20
|
-
const Component = as || 'span';
|
|
21
|
-
const { value: liveValue, ref } = useFimoLiveValue(value);
|
|
22
|
-
// Defensive: return null if no value
|
|
23
|
-
if (value === null || value === undefined) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const source = getFimoSource(value);
|
|
27
|
-
const content = children ? children(liveValue) : JSON.stringify(liveValue);
|
|
28
|
-
return (_jsx(Component, { ref: ref, ...props, "data-fimo-source": source, children: content }));
|
|
29
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { type FimoRichText, type FimoRichTextComponents } from '../lib/index.js';
|
|
3
|
-
type RichTextProps = {
|
|
4
|
-
value: FimoRichText | null | undefined;
|
|
5
|
-
components?: FimoRichTextComponents;
|
|
6
|
-
} & Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
7
|
-
export declare function RichText({ value, components, ...props }: RichTextProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=RichText.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
-
import { type FimoMedia } from '../lib/index.js';
|
|
3
|
-
type BaseVideoProps = Omit<ComponentPropsWithoutRef<'video'>, 'src' | 'children'> & {
|
|
4
|
-
overrideSrc?: string;
|
|
5
|
-
};
|
|
6
|
-
type VideoProps = BaseVideoProps & {
|
|
7
|
-
value: FimoMedia;
|
|
8
|
-
children?: (media: FimoMedia) => ReactNode;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Video component for rendering schema media with source tracking.
|
|
12
|
-
*
|
|
13
|
-
* Renders a native `<video>` element with `data-fimo-source` for edit tracking.
|
|
14
|
-
* Defaults to `autoPlay`, `loop`, `muted`, and `playsInline` for hero/background use.
|
|
15
|
-
* All defaults can be overridden via props.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* <Video value={post.heroVideo} />
|
|
19
|
-
* <Video value={post.heroVideo} autoPlay={false} controls />
|
|
20
|
-
* <Video value={post.bgVideo} className="absolute inset-0 object-cover" />
|
|
21
|
-
*
|
|
22
|
-
* // With render function for custom markup
|
|
23
|
-
* <Video value={post.video}>
|
|
24
|
-
* {(media) => (
|
|
25
|
-
* <video src={media.url} controls />
|
|
26
|
-
* )}
|
|
27
|
-
* </Video>
|
|
28
|
-
*/
|
|
29
|
-
export declare function Video(props: VideoProps): import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=Video.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FIMO_SOURCE, useFimoLiveValue } from '../lib/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Video component for rendering schema media with source tracking.
|
|
5
|
-
*
|
|
6
|
-
* Renders a native `<video>` element with `data-fimo-source` for edit tracking.
|
|
7
|
-
* Defaults to `autoPlay`, `loop`, `muted`, and `playsInline` for hero/background use.
|
|
8
|
-
* All defaults can be overridden via props.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* <Video value={post.heroVideo} />
|
|
12
|
-
* <Video value={post.heroVideo} autoPlay={false} controls />
|
|
13
|
-
* <Video value={post.bgVideo} className="absolute inset-0 object-cover" />
|
|
14
|
-
*
|
|
15
|
-
* // With render function for custom markup
|
|
16
|
-
* <Video value={post.video}>
|
|
17
|
-
* {(media) => (
|
|
18
|
-
* <video src={media.url} controls />
|
|
19
|
-
* )}
|
|
20
|
-
* </Video>
|
|
21
|
-
*/
|
|
22
|
-
export function Video(props) {
|
|
23
|
-
const { value: media, children, overrideSrc, autoPlay = true, loop = true, muted = true, playsInline = true, style, ...videoProps } = props;
|
|
24
|
-
const { value: liveMedia, ref } = useFimoLiveValue(media ?? null);
|
|
25
|
-
if (!liveMedia) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
const mediaSource = liveMedia[FIMO_SOURCE];
|
|
29
|
-
if (children) {
|
|
30
|
-
return (_jsx("span", { ref: ref, "data-fimo-source": mediaSource, children: children(liveMedia) }));
|
|
31
|
-
}
|
|
32
|
-
const finalSrc = overrideSrc ?? liveMedia.url;
|
|
33
|
-
return (_jsx("video", { ref: ref, src: finalSrc, width: liveMedia.width, height: liveMedia.height, autoPlay: autoPlay, loop: loop, muted: muted, playsInline: playsInline, style: style, ...videoProps, "data-fimo-source": mediaSource }));
|
|
34
|
-
}
|