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.
Files changed (90) hide show
  1. package/assets/skills/fimo/SKILL.md +7 -5
  2. package/assets/skills/fimo-cli/SKILL.md +8 -16
  3. package/assets/skills/fimo-cli/references/agent-setup.md +13 -13
  4. package/assets/skills/fimo-cli/references/assets.md +2 -2
  5. package/assets/skills/fimo-cli/references/content.md +10 -10
  6. package/assets/skills/fimo-cli/references/forms.md +6 -6
  7. package/assets/skills/fimo-cli/references/init.md +1 -1
  8. package/assets/skills/fimo-cli/references/labels.md +3 -3
  9. package/assets/skills/fimo-cli/references/locales.md +1 -1
  10. package/assets/skills/fimo-code/SKILL.md +2 -2
  11. package/assets/skills/fimo-studio/SKILL.md +3 -1
  12. package/assets/skills/fimo-studio/references/ai-chat.md +1 -1
  13. package/assets/skills/fimo-studio/references/command-palette.md +31 -0
  14. package/dist/build/vite/plugins/content-sync.js +1 -1
  15. package/dist/cli/bundle.json +1 -1
  16. package/dist/cli/index.js +167 -58
  17. package/dist/runtime/labels/core.d.ts +18 -0
  18. package/dist/runtime/labels/core.js +15 -0
  19. package/dist/runtime/labels/fetch.d.ts +7 -0
  20. package/dist/runtime/labels/fetch.js +41 -0
  21. package/dist/runtime/next/client.d.ts +11 -3
  22. package/dist/runtime/next/client.js +9 -2
  23. package/dist/runtime/next/facade.d.ts +8 -0
  24. package/dist/runtime/next/facade.js +34 -0
  25. package/dist/runtime/next/labels.d.ts +7 -0
  26. package/dist/runtime/next/labels.js +9 -0
  27. package/dist/runtime/next/{Text.d.ts → primitives/Text.d.ts} +1 -1
  28. package/dist/runtime/next/{Text.js → primitives/Text.js} +1 -1
  29. package/dist/runtime/next/primitives/server.d.ts +9 -0
  30. package/dist/runtime/next/primitives/server.js +46 -0
  31. package/dist/runtime/next/provider.d.ts +5 -2
  32. package/dist/runtime/next/provider.js +18 -5
  33. package/dist/runtime/next/server.d.ts +8 -1
  34. package/dist/runtime/next/server.js +5 -1
  35. package/dist/runtime/primitives/index.d.ts +10 -10
  36. package/dist/runtime/primitives/index.js +10 -10
  37. package/dist/runtime/primitives/lib/image-optimization.d.ts +10 -1
  38. package/dist/runtime/primitives/lib/image-optimization.js +12 -12
  39. package/dist/runtime/primitives/lib/index.d.ts +0 -1
  40. package/dist/runtime/primitives/lib/index.js +0 -1
  41. package/dist/runtime/react/primitives/contracts.d.ts +56 -0
  42. package/dist/runtime/react/primitives/contracts.js +1 -0
  43. package/dist/runtime/react/primitives/editable/Boolean.d.ts +5 -0
  44. package/dist/runtime/react/primitives/editable/Boolean.js +11 -0
  45. package/dist/runtime/react/primitives/editable/Date.d.ts +4 -0
  46. package/dist/runtime/react/primitives/editable/Date.js +12 -0
  47. package/dist/runtime/react/primitives/editable/Image.d.ts +4 -0
  48. package/dist/runtime/react/primitives/editable/Image.js +10 -0
  49. package/dist/runtime/react/primitives/editable/Json.d.ts +5 -0
  50. package/dist/runtime/react/primitives/editable/Json.js +11 -0
  51. package/dist/runtime/react/primitives/editable/RichText.d.ts +4 -0
  52. package/dist/runtime/react/primitives/editable/RichText.js +11 -0
  53. package/dist/runtime/{primitives/components → react/primitives/editable}/Text.d.ts +3 -6
  54. package/dist/runtime/{primitives/components → react/primitives/editable}/Text.js +2 -1
  55. package/dist/runtime/react/primitives/editable/Video.d.ts +4 -0
  56. package/dist/runtime/react/primitives/editable/Video.js +10 -0
  57. package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +11 -0
  58. package/dist/runtime/react/primitives/renderers/DateRenderer.js +14 -0
  59. package/dist/runtime/react/primitives/renderers/ImageRenderer.d.ts +8 -0
  60. package/dist/runtime/react/primitives/renderers/ImageRenderer.js +50 -0
  61. package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +11 -0
  62. package/dist/runtime/{primitives/components/RichText.js → react/primitives/renderers/RichTextRenderer.js} +4 -6
  63. package/dist/runtime/{primitives/components → react/primitives/renderers}/StaticImage.d.ts +2 -11
  64. package/dist/runtime/{primitives/components → react/primitives/renderers}/StaticImage.js +5 -3
  65. package/dist/runtime/react/primitives/renderers/VideoRenderer.d.ts +8 -0
  66. package/dist/runtime/react/primitives/renderers/VideoRenderer.js +10 -0
  67. package/dist/runtime/{primitives/lib → react}/useFimoLiveValue.d.ts +3 -3
  68. package/dist/runtime/{primitives/lib → react}/useFimoLiveValue.js +3 -3
  69. package/dist/runtime/vite/primitives/Images.d.ts +4 -0
  70. package/dist/runtime/vite/primitives/Images.js +12 -0
  71. package/dist/runtime/{primitives → vite}/translations.d.ts +1 -1
  72. package/dist/runtime/{primitives → vite}/translations.js +1 -1
  73. package/dist/scripts/sync-schemas.d.ts +2 -1
  74. package/dist/scripts/sync-schemas.js +119 -67
  75. package/package.json +2 -1
  76. package/templates/react-router/AGENTS.md +4 -2
  77. package/templates/react-router/package.json +1 -1
  78. package/dist/runtime/primitives/components/Boolean.d.ts +0 -29
  79. package/dist/runtime/primitives/components/Boolean.js +0 -33
  80. package/dist/runtime/primitives/components/Date.d.ts +0 -30
  81. package/dist/runtime/primitives/components/Date.js +0 -43
  82. package/dist/runtime/primitives/components/Image.d.ts +0 -72
  83. package/dist/runtime/primitives/components/Image.js +0 -108
  84. package/dist/runtime/primitives/components/Json.d.ts +0 -25
  85. package/dist/runtime/primitives/components/Json.js +0 -29
  86. package/dist/runtime/primitives/components/RichText.d.ts +0 -9
  87. package/dist/runtime/primitives/components/Video.d.ts +0 -31
  88. package/dist/runtime/primitives/components/Video.js +0 -34
  89. package/dist/runtime/primitives/components/index.d.ts +0 -6
  90. package/dist/runtime/primitives/components/index.js +0 -5
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useFimoLiveValue } from '../../useFimoLiveValue.js';
3
+ import { ImageRenderer } from '../renderers/ImageRenderer.js';
4
+ export function Image({ value: media, ...props }) {
5
+ const { value: liveMedia, ref } = useFimoLiveValue(media ?? null);
6
+ if (!liveMedia) {
7
+ return null;
8
+ }
9
+ return _jsx(ImageRenderer, { ...props, value: liveMedia, elementRef: ref });
10
+ }
@@ -0,0 +1,5 @@
1
+ import { type ElementType } from 'react';
2
+ import type { JsonProps } from '../contracts.js';
3
+ export type { JsonProps } from '../contracts.js';
4
+ export declare function Json<T extends ElementType = 'span'>({ value, as, children, ...props }: JsonProps<T>): import("react/jsx-runtime").JSX.Element | null;
5
+ //# sourceMappingURL=Json.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getFimoSource } from '../../../primitives/lib/index.js';
3
+ import { useFimoLiveValue } from '../../useFimoLiveValue.js';
4
+ export function Json({ value, as, children, ...props }) {
5
+ const Component = as || 'span';
6
+ const { value: liveValue, ref } = useFimoLiveValue(value);
7
+ if (value === null || value === undefined) {
8
+ return null;
9
+ }
10
+ return (_jsx(Component, { ref: ref, ...props, "data-fimo-source": getFimoSource(value), children: children ? children(liveValue) : JSON.stringify(liveValue) }));
11
+ }
@@ -0,0 +1,4 @@
1
+ import type { RichTextProps } from '../contracts.js';
2
+ export type { RichTextProps } from '../contracts.js';
3
+ export declare function RichText({ value, components, ...props }: RichTextProps): import("react/jsx-runtime").JSX.Element | null;
4
+ //# sourceMappingURL=RichText.d.ts.map
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FIMO_SOURCE } from '../../../primitives/lib/index.js';
3
+ import { useFimoLiveValue } from '../../useFimoLiveValue.js';
4
+ import { RichTextRenderer } from '../renderers/RichTextRenderer.js';
5
+ export function RichText({ value, components, ...props }) {
6
+ const { value: liveContent, ref } = useFimoLiveValue(value?.content ?? null);
7
+ if (!value) {
8
+ return null;
9
+ }
10
+ return (_jsx(RichTextRenderer, { ...props, document: liveContent, source: value[FIMO_SOURCE], components: components, elementRef: ref }));
11
+ }
@@ -1,9 +1,6 @@
1
- import { type ComponentPropsWithoutRef, type ElementType, type ReactNode } from 'react';
2
- export type TextProps<T extends ElementType = 'span'> = {
3
- value: unknown;
4
- as?: T;
5
- children?: (value: string) => ReactNode;
6
- } & Omit<ComponentPropsWithoutRef<T>, 'value' | 'as' | 'children'>;
1
+ import { type ElementType } from 'react';
2
+ import type { TextProps } from '../contracts.js';
3
+ export type { TextProps } from '../contracts.js';
7
4
  /**
8
5
  * Text component for rendering text with source tracking
9
6
  *
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Fragment } from 'react';
3
- import { getFimoParts, getFimoSource, useFimoLiveValue } from '../lib/index.js';
3
+ import { getFimoParts, getFimoSource } from '../../../primitives/lib/index.js';
4
+ import { useFimoLiveValue } from '../../useFimoLiveValue.js';
4
5
  /**
5
6
  * Text component for rendering text with source tracking
6
7
  *
@@ -0,0 +1,4 @@
1
+ import type { VideoProps } from '../contracts.js';
2
+ export type { BaseVideoProps, VideoProps } from '../contracts.js';
3
+ export declare function Video({ value: media, ...props }: VideoProps): import("react/jsx-runtime").JSX.Element | null;
4
+ //# sourceMappingURL=Video.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useFimoLiveValue } from '../../useFimoLiveValue.js';
3
+ import { VideoRenderer } from '../renderers/VideoRenderer.js';
4
+ export function Video({ value: media, ...props }) {
5
+ const { value: liveMedia, ref } = useFimoLiveValue(media ?? null);
6
+ if (!liveMedia) {
7
+ return null;
8
+ }
9
+ return _jsx(VideoRenderer, { ...props, value: liveMedia, elementRef: ref });
10
+ }
@@ -0,0 +1,11 @@
1
+ import { type ReactNode, type Ref } from 'react';
2
+ import type { FimoDate, FimoString } from '../../../primitives/lib/index.js';
3
+ export interface DateRendererProps {
4
+ value: FimoDate | FimoString | Date | string | number;
5
+ source: string | undefined;
6
+ children?: (date: Date) => ReactNode;
7
+ className?: string;
8
+ elementRef?: Ref<HTMLTimeElement>;
9
+ }
10
+ export declare function DateRenderer({ value, source, children, className, elementRef }: DateRendererProps): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=DateRenderer.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function DateRenderer({ value, source, children, className, elementRef }) {
3
+ const rawValue = value instanceof String ? value.toString() : value;
4
+ const dateValue = new globalThis.Date(rawValue);
5
+ const isoDate = dateValue.toISOString().split('T')[0];
6
+ const content = children
7
+ ? children(dateValue)
8
+ : dateValue.toLocaleDateString(undefined, {
9
+ year: 'numeric',
10
+ month: 'short',
11
+ day: 'numeric',
12
+ });
13
+ return (_jsx("time", { ref: elementRef, dateTime: isoDate, className: className, "data-fimo-source": source, children: content }));
14
+ }
@@ -0,0 +1,8 @@
1
+ import { type RefObject } from 'react';
2
+ import type { ImageProps } from '../contracts.js';
3
+ interface ImageRendererProps extends ImageProps {
4
+ elementRef?: RefObject<HTMLElement | null>;
5
+ }
6
+ export declare function ImageRenderer({ value: media, children, quality, unoptimized, fit, width, height, alt: altOverride, overrideSrc, srcSet: srcSetOverride, sizes, style, hostSuffixes, elementRef, ...imgProps }: ImageRendererProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=ImageRenderer.d.ts.map
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { buildOptimizedUrl, clampQuality, computeImageOptimizationConfig, isOptimizableFimoUrl, resolveFit, toObjectFit, toPositiveInt, } from '../../../primitives/lib/image-optimization.js';
3
+ import { FIMO_SOURCE } from '../../../primitives/lib/primitives.js';
4
+ export function ImageRenderer({ value: media, children, quality, unoptimized = false, fit, width, height, alt: altOverride, overrideSrc, srcSet: srcSetOverride, sizes, style, hostSuffixes, elementRef, ...imgProps }) {
5
+ const mediaSource = media[FIMO_SOURCE];
6
+ if (children) {
7
+ return (_jsx("span", { ref: elementRef, "data-fimo-source": mediaSource, children: children(media) }));
8
+ }
9
+ const normalizedQuality = clampQuality(quality);
10
+ const normalizedFit = resolveFit(fit);
11
+ const requestedWidth = toPositiveInt(width);
12
+ const requestedHeight = toPositiveInt(height);
13
+ const displayWidth = requestedWidth ?? media.width;
14
+ const displayHeight = requestedHeight ?? media.height;
15
+ const originalSrc = media.url;
16
+ const resolvedAlt = altOverride ?? media.alt;
17
+ const hasSizesAttr = typeof sizes === 'string' && sizes.trim().length > 0;
18
+ const hasSizingHint = hasSizesAttr || requestedWidth !== undefined || requestedHeight !== undefined;
19
+ const canOptimizeSource = !unoptimized && isOptimizableFimoUrl(originalSrc, hostSuffixes);
20
+ const shouldOptimize = canOptimizeSource && hasSizingHint;
21
+ const { generatedSrcSet, transformWidth, transformDpr } = computeImageOptimizationConfig({
22
+ shouldOptimize,
23
+ hasSizesAttr,
24
+ srcSetOverride,
25
+ originalSrc,
26
+ mediaWidth: media.width,
27
+ renderWidth: displayWidth,
28
+ quality: normalizedQuality,
29
+ fit: normalizedFit,
30
+ hostSuffixes,
31
+ });
32
+ const finalSrcSet = srcSetOverride ?? generatedSrcSet;
33
+ const optimizedSrc = shouldOptimize
34
+ ? buildOptimizedUrl(originalSrc, {
35
+ width: transformWidth,
36
+ quality: normalizedQuality,
37
+ fit: normalizedFit,
38
+ dpr: transformDpr,
39
+ hostSuffixes,
40
+ })
41
+ : originalSrc;
42
+ const finalSrc = overrideSrc ?? optimizedSrc;
43
+ const finalStyle = style?.objectFit
44
+ ? style
45
+ : {
46
+ ...style,
47
+ objectFit: toObjectFit(normalizedFit),
48
+ };
49
+ return (_jsx("img", { ref: elementRef, src: finalSrc, alt: resolvedAlt, width: displayWidth, height: displayHeight, style: finalStyle, sizes: sizes, srcSet: finalSrcSet, ...imgProps, "data-fimo-source": mediaSource }));
50
+ }
@@ -0,0 +1,11 @@
1
+ import { type ComponentPropsWithoutRef, type Ref } from 'react';
2
+ import type { FimoRichTextComponents, FimoRichTextContent } from '../../../primitives/lib/index.js';
3
+ interface RichTextRendererProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
4
+ document: FimoRichTextContent | null | undefined;
5
+ source: string | undefined;
6
+ components?: FimoRichTextComponents;
7
+ elementRef?: Ref<HTMLDivElement>;
8
+ }
9
+ export declare function RichTextRenderer({ document, source, components, elementRef, ...props }: RichTextRendererProps): import("react/jsx-runtime").JSX.Element | null;
10
+ export {};
11
+ //# sourceMappingURL=RichTextRenderer.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Fragment } from 'react';
3
- import { FIMO_SOURCE, useFimoLiveValue, } from '../lib/index.js';
4
3
  function DefaultParagraph({ children }) {
5
4
  return _jsx("p", { children: children });
6
5
  }
@@ -118,7 +117,7 @@ function renderNode(node, components, key) {
118
117
  }
119
118
  return _jsx(Fragment, { children: result }, key);
120
119
  }
121
- const children = node.content?.map((child, i) => renderNode(child, components, i)) ?? null;
120
+ const children = node.content?.map((child, index) => renderNode(child, components, index)) ?? null;
122
121
  if (node.type === 'doc') {
123
122
  return _jsx(Fragment, { children: children }, key);
124
123
  }
@@ -128,10 +127,9 @@ function renderNode(node, components, key) {
128
127
  }
129
128
  return _jsx(Fragment, { children: children }, key);
130
129
  }
131
- export function RichText({ value, components, ...props }) {
132
- const { value: liveContent, ref } = useFimoLiveValue(value?.content ?? null);
133
- if (!value || !liveContent) {
130
+ export function RichTextRenderer({ document, source, components, elementRef, ...props }) {
131
+ if (!document) {
134
132
  return null;
135
133
  }
136
- return (_jsx("div", { ref: ref, ...props, "data-fimo-source": value[FIMO_SOURCE], "data-fimo-richtext": "", children: renderNode(liveContent, components, 0) }));
134
+ return (_jsx("div", { ref: elementRef, ...props, "data-fimo-source": source, "data-fimo-richtext": "", children: renderNode(document, components, 0) }));
137
135
  }
@@ -1,13 +1,5 @@
1
- import type { ComponentPropsWithoutRef } from 'react';
2
- import { type ImageFit } from '../lib/image-optimization.js';
3
- type StaticImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'children'> & {
4
- /** Image quality (1-100). Defaults to 85. */
5
- quality?: number;
6
- /** Resize fit mode. Also maps to CSS object-fit. Defaults to 'scale-down'. */
7
- fit?: ImageFit;
8
- /** Skip optimization and use original URL. */
9
- unoptimized?: boolean;
10
- };
1
+ import type { StaticImageProps } from '../contracts.js';
2
+ export type { StaticImageProps } from '../contracts.js';
11
3
  /**
12
4
  * Optimized image component for non-schema images.
13
5
  *
@@ -40,5 +32,4 @@ type StaticImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'children'> & {
40
32
  * <StaticImage src="/images/logo.svg" alt="Logo" unoptimized />
41
33
  */
42
34
  export declare function StaticImage(props: StaticImageProps): import("react/jsx-runtime").JSX.Element | null;
43
- export {};
44
35
  //# sourceMappingURL=StaticImage.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { clampQuality, resolveFit, toObjectFit, toPositiveInt, isOptimizableFimoUrl, buildOptimizedUrl, computeImageOptimizationConfig, } from '../lib/image-optimization.js';
2
+ import { clampQuality, resolveFit, toObjectFit, toPositiveInt, isOptimizableFimoUrl, buildOptimizedUrl, computeImageOptimizationConfig, } from '../../../primitives/lib/image-optimization.js';
3
3
  /**
4
4
  * Optimized image component for non-schema images.
5
5
  *
@@ -32,7 +32,7 @@ import { clampQuality, resolveFit, toObjectFit, toPositiveInt, isOptimizableFimo
32
32
  * <StaticImage src="/images/logo.svg" alt="Logo" unoptimized />
33
33
  */
34
34
  export function StaticImage(props) {
35
- const { src, alt, quality, unoptimized = false, fit, width, height, srcSet: srcSetOverride, sizes, style, ...imgProps } = props;
35
+ const { src, alt, quality, unoptimized = false, fit, width, height, srcSet: srcSetOverride, sizes, style, hostSuffixes, ...imgProps } = props;
36
36
  if (!src) {
37
37
  return null;
38
38
  }
@@ -42,7 +42,7 @@ export function StaticImage(props) {
42
42
  const requestedHeight = toPositiveInt(height);
43
43
  const hasSizesAttr = typeof sizes === 'string' && sizes.trim().length > 0;
44
44
  const hasSizingHint = hasSizesAttr || requestedWidth !== undefined || requestedHeight !== undefined;
45
- const canOptimizeSource = !unoptimized && isOptimizableFimoUrl(src);
45
+ const canOptimizeSource = !unoptimized && isOptimizableFimoUrl(src, hostSuffixes);
46
46
  const shouldOptimize = canOptimizeSource && hasSizingHint;
47
47
  const { generatedSrcSet, transformWidth, transformDpr } = computeImageOptimizationConfig({
48
48
  shouldOptimize,
@@ -53,6 +53,7 @@ export function StaticImage(props) {
53
53
  renderWidth: requestedWidth,
54
54
  quality: normalizedQuality,
55
55
  fit: normalizedFit,
56
+ hostSuffixes,
56
57
  });
57
58
  const finalSrcSet = srcSetOverride ?? generatedSrcSet;
58
59
  const optimizedSrc = shouldOptimize
@@ -61,6 +62,7 @@ export function StaticImage(props) {
61
62
  quality: normalizedQuality,
62
63
  fit: normalizedFit,
63
64
  dpr: transformDpr,
65
+ hostSuffixes,
64
66
  })
65
67
  : src;
66
68
  const finalStyle = style?.objectFit
@@ -0,0 +1,8 @@
1
+ import { type RefObject } from 'react';
2
+ import type { VideoProps } from '../contracts.js';
3
+ interface VideoRendererProps extends VideoProps {
4
+ elementRef?: RefObject<HTMLElement | null>;
5
+ }
6
+ export declare function VideoRenderer({ value: media, children, overrideSrc, autoPlay, loop, muted, playsInline, style, elementRef, ...videoProps }: VideoRendererProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=VideoRenderer.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { FIMO_SOURCE } from '../../../primitives/lib/primitives.js';
3
+ export function VideoRenderer({ value: media, children, overrideSrc, autoPlay = true, loop = true, muted = true, playsInline = true, style, elementRef, ...videoProps }) {
4
+ const mediaSource = media[FIMO_SOURCE];
5
+ if (children) {
6
+ return (_jsx("span", { ref: elementRef, "data-fimo-source": mediaSource, children: children(media) }));
7
+ }
8
+ const finalSrc = overrideSrc ?? media.url;
9
+ return (_jsx("video", { ref: elementRef, src: finalSrc, width: media.width, height: media.height, autoPlay: autoPlay, loop: loop, muted: muted, playsInline: playsInline, style: style, ...videoProps, "data-fimo-source": mediaSource }));
10
+ }
@@ -9,9 +9,9 @@ import { type RefObject } from 'react';
9
9
  * preview knows to dispatch events instead of falling back to raw DOM writes,
10
10
  * and updates internal state when a mutation arrives.
11
11
  *
12
- * The subscription is framework-neutral: Vite and Next.js render the same
13
- * primitives, and environments that never dispatch `fimo:live-edit` simply
14
- * keep mirroring the external value.
12
+ * The hook is framework-adapter-neutral: Vite and Next.js clients render the
13
+ * same React primitives, and environments that never dispatch
14
+ * `fimo:live-edit` simply keep mirroring the external value.
15
15
  */
16
16
  export declare function useFimoLiveValue<T, E extends HTMLElement = HTMLElement>(external: T): {
17
17
  value: T;
@@ -9,9 +9,9 @@ import { useEffect, useRef, useState } from 'react';
9
9
  * preview knows to dispatch events instead of falling back to raw DOM writes,
10
10
  * and updates internal state when a mutation arrives.
11
11
  *
12
- * The subscription is framework-neutral: Vite and Next.js render the same
13
- * primitives, and environments that never dispatch `fimo:live-edit` simply
14
- * keep mirroring the external value.
12
+ * The hook is framework-adapter-neutral: Vite and Next.js clients render the
13
+ * same React primitives, and environments that never dispatch
14
+ * `fimo:live-edit` simply keep mirroring the external value.
15
15
  */
16
16
  export function useFimoLiveValue(external) {
17
17
  const ref = useRef(null);
@@ -0,0 +1,4 @@
1
+ import type { ImageProps, StaticImageProps } from '../../react/primitives/contracts.js';
2
+ export declare function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function StaticImage(props: StaticImageProps): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=Images.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { parseImageHostSuffixes } from '../../primitives/lib/image-optimization.js';
3
+ import { Image as BaseImage } from '../../react/primitives/editable/Image.js';
4
+ import { StaticImage as BaseStaticImage } from '../../react/primitives/renderers/StaticImage.js';
5
+ const viteEnvironment = import.meta.env;
6
+ const IMAGE_HOST_SUFFIXES = parseImageHostSuffixes(viteEnvironment?.VITE_FIMO_IMAGE_HOSTS);
7
+ export function Image(props) {
8
+ return _jsx(BaseImage, { ...props, hostSuffixes: IMAGE_HOST_SUFFIXES });
9
+ }
10
+ export function StaticImage(props) {
11
+ return _jsx(BaseStaticImage, { ...props, hostSuffixes: IMAGE_HOST_SUFFIXES });
12
+ }
@@ -1,4 +1,4 @@
1
- import { FimoString } from './lib/index.js';
1
+ import { FimoString } from '../primitives/lib/index.js';
2
2
  /**
3
3
  * Hook to provide a label function (`t`).
4
4
  *
@@ -1,7 +1,7 @@
1
1
  import { useSyncExternalStore } from 'react';
2
2
  import { defaultLocale as bundledDefaultLocale, dictionaries as bundledDictionaries, signature as translationSignature, updatedAt as bundledUpdatedAt, } from 'virtual:translations';
3
3
  import { useLocale } from '../i18n/FimoLocaleContext.js';
4
- import { FimoString } from './lib/index.js';
4
+ import { FimoString } from '../primitives/lib/index.js';
5
5
  const labelListeners = new Set();
6
6
  let labelState = {
7
7
  dictionaries: bundledDictionaries ?? {},
@@ -1,5 +1,6 @@
1
1
  export interface SyncSchemasOptions {
2
2
  cwd?: string;
3
+ framework: string | null;
3
4
  verbose?: boolean;
4
5
  }
5
6
  export interface SyncResult {
@@ -7,4 +8,4 @@ export interface SyncResult {
7
8
  updated: number;
8
9
  deleted: number;
9
10
  }
10
- export declare function syncSchemas(options?: SyncSchemasOptions): SyncResult;
11
+ export declare function syncSchemas(options: SyncSchemasOptions): SyncResult;