fimo 2.2.0-staging.1 → 2.2.0-staging.10

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 (63) hide show
  1. package/README.md +3 -2
  2. package/assets/agent-templates/_default/config.yaml +1 -0
  3. package/assets/agent-templates/broken-link-sweeper/config.yaml +1 -0
  4. package/assets/agent-templates/content-translator/config.yaml +1 -0
  5. package/assets/agent-templates/post-deploy-check/config.yaml +1 -0
  6. package/assets/agent-templates/seo-audit/config.yaml +1 -0
  7. package/assets/skills/fimo-cli/SKILL.md +4 -4
  8. package/assets/skills/fimo-cli/references/agents.md +2 -1
  9. package/assets/skills/fimo-cli/references/assets.md +4 -1
  10. package/assets/skills/fimo-cli/references/content.md +3 -3
  11. package/assets/skills/fimo-cli/references/deploy.md +2 -2
  12. package/assets/skills/fimo-cli/references/forms.md +3 -1
  13. package/assets/skills/fimo-cli/references/history.md +1 -0
  14. package/assets/skills/fimo-cli/references/init.md +30 -39
  15. package/assets/skills/fimo-cli/references/schedules.md +4 -2
  16. package/assets/skills/fimo-cli/references/webhooks.md +2 -0
  17. package/assets/skills/fimo-code/references/frameworks/next.md +4 -1
  18. package/assets/skills/fimo-code/references/frameworks/react-router.md +4 -3
  19. package/assets/skills/fimo-studio/references/preview-and-responsive.md +4 -1
  20. package/assets/skills/fimo-studio/references/visual-editing.md +9 -1
  21. package/dist/build/astro/config.js +2 -1
  22. package/dist/build/vite/plugins/preview-health.d.ts +4 -0
  23. package/dist/build/vite/plugins/preview-health.js +40 -0
  24. package/dist/cli/bundle.json +1 -1
  25. package/dist/cli/index.js +112 -113
  26. package/dist/runtime/content/client/collection-core.js +3 -2
  27. package/dist/runtime/content/client/core-types.d.ts +4 -3
  28. package/dist/runtime/content/client/internal.d.ts +2 -0
  29. package/dist/runtime/content/client/internal.js +54 -25
  30. package/dist/runtime/content/client/singleton-core.js +2 -1
  31. package/dist/runtime/content/index.d.ts +1 -1
  32. package/dist/runtime/content/index.js +1 -1
  33. package/dist/runtime/primitives/lib/index.d.ts +1 -1
  34. package/dist/runtime/primitives/lib/index.js +1 -1
  35. package/dist/runtime/primitives/lib/primitives.d.ts +24 -5
  36. package/dist/runtime/primitives/lib/primitives.js +69 -16
  37. package/dist/runtime/primitives/lib/template.js +2 -2
  38. package/dist/runtime/templates.d.ts +8 -2
  39. package/dist/runtime/templates.js +34 -8
  40. package/package.json +13 -9
  41. package/templates/astro/package.json +2 -2
  42. package/templates/nextjs/AGENTS.md +1 -1
  43. package/templates/nextjs/package.json +4 -4
  44. package/templates/react-router/.fimo/config.json +1 -2
  45. package/templates/react-router/AGENTS.md +1 -1
  46. package/templates/react-router/package.json +4 -4
  47. package/templates/sveltekit/package.json +2 -2
  48. package/templates/vite/package.json +4 -4
  49. package/assets/starters/fimo-site/manifest.json +0 -64
  50. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/GOAL.md +0 -8
  51. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
  52. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/config.yaml +0 -9
  53. package/assets/starters/fimo-site/template/.fimo/agents/site-review/GOAL.md +0 -14
  54. package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -3
  55. package/assets/starters/fimo-site/template/.fimo/agents/site-review/config.yaml +0 -9
  56. package/assets/starters/fimo-site/template/src/forms/contact.json +0 -14
  57. package/assets/starters/fimo-site/template/src/forms/contact.ts +0 -46
  58. package/assets/starters/fimo-site/template/src/pages/Contact.tsx +0 -193
  59. package/assets/starters/fimo-site/template/src/pages/Index.tsx +0 -27
  60. package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +0 -191
  61. package/assets/starters/fimo-site/template/src/schemas/HomePage.json +0 -28
  62. package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +0 -29
  63. package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +0 -64
@@ -1,191 +0,0 @@
1
- import { RichText, Text, useLabels } from 'fimo-react';
2
- import { ArrowDown, ArrowUpRight } from 'lucide-react';
3
-
4
- import { Button } from '@/components/ui/button';
5
- import { Skeleton } from '@/components/ui/skeleton';
6
- import { cn } from '@/lib/utils';
7
- import type { HomePage } from '@/schemas/HomePage';
8
-
9
- export function SiteHeader() {
10
- const { t } = useLabels();
11
-
12
- return (
13
- <header className="border-border/70 bg-background/85 sticky top-0 z-30 border-b backdrop-blur">
14
- <div className="mx-auto flex h-16 w-full max-w-6xl items-center justify-between gap-6 px-6 lg:px-10">
15
- <Mark />
16
- <nav className="flex min-w-0 items-center gap-5">
17
- <a
18
- href="#stories"
19
- className="text-muted-foreground hover:text-foreground hidden truncate text-sm transition-colors sm:inline"
20
- >
21
- <Text value={t('nav.stories')} />
22
- </a>
23
- <Button asChild size="sm" variant="outline" className="min-w-0 shrink">
24
- <a href="#contact">
25
- <Text value={t('nav.contact')} className="truncate" />
26
- </a>
27
- </Button>
28
- </nav>
29
- </div>
30
- </header>
31
- );
32
- }
33
-
34
- export function Hero({ page }: { page: HomePage }) {
35
- const { t } = useLabels();
36
-
37
- return (
38
- <section className="border-border/70 border-b">
39
- <div className="mx-auto w-full max-w-6xl px-6 py-20 lg:px-10 lg:py-32">
40
- <p className="text-muted-foreground flex items-center gap-4 text-[11px] font-semibold tracking-[0.24em] uppercase">
41
- <span aria-hidden className="bg-primary h-px w-10 shrink-0" />
42
- <Text value={page.eyebrow} />
43
- </p>
44
-
45
- <div className="mt-10 grid gap-12 lg:mt-14 lg:grid-cols-12 lg:gap-16">
46
- <Text
47
- value={page.title}
48
- as="h1"
49
- className="text-5xl leading-[0.95] font-semibold tracking-[-0.04em] text-balance sm:text-6xl lg:col-span-7 lg:text-7xl"
50
- />
51
-
52
- <div className="lg:col-span-5 lg:pt-3">
53
- <RichText
54
- value={page.intro}
55
- className="text-muted-foreground max-w-md text-lg leading-relaxed [&>p+p]:mt-4"
56
- />
57
-
58
- <div className="mt-10 flex flex-wrap items-center gap-x-8 gap-y-4">
59
- <Button asChild size="lg" className="group">
60
- <a href={String(page.primaryCtaHref)}>
61
- <Text value={page.primaryCtaLabel} />
62
- <ArrowUpRight className="transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5" />
63
- </a>
64
- </Button>
65
- <a
66
- href="#stories"
67
- className="text-muted-foreground hover:text-foreground group inline-flex items-center gap-2 text-sm transition-colors"
68
- >
69
- <Text value={t('hero.scroll')} />
70
- <ArrowDown className="size-4 transition-transform group-hover:translate-y-0.5" />
71
- </a>
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </section>
77
- );
78
- }
79
-
80
- export function Stories({ items }: { items: HomePage['featured'] }) {
81
- const { t } = useLabels();
82
-
83
- if (items.length === 0) {
84
- return null;
85
- }
86
-
87
- return (
88
- <section id="stories" aria-labelledby="stories-title" className="border-border/70 scroll-mt-16 border-b">
89
- <div className="mx-auto w-full max-w-6xl px-6 lg:px-10">
90
- <Text
91
- value={t('nav.stories')}
92
- as="h2"
93
- id="stories-title"
94
- className="text-muted-foreground pt-16 text-[11px] font-semibold tracking-[0.24em] uppercase lg:pt-24"
95
- />
96
- <ul className="divide-border/70 border-border/70 mt-8 divide-y border-t">
97
- {items.map((item, index) => (
98
- <li key={item._key}>
99
- <a
100
- href={item.href}
101
- className="focus-visible:ring-ring/50 group grid gap-5 rounded-md py-10 outline-none focus-visible:ring-[3px] md:grid-cols-12 md:gap-8 md:py-14"
102
- >
103
- <div className="flex items-baseline gap-4 md:col-span-4">
104
- <span className="text-primary font-mono text-xs tabular-nums">
105
- {String(index + 1).padStart(2, '0')}
106
- </span>
107
- <Text value={item.label} className="text-sm font-medium" />
108
- </div>
109
-
110
- <div className="flex items-start gap-6 md:col-span-8">
111
- <div className="min-w-0 transition-transform duration-300 group-hover:translate-x-1">
112
- <Text
113
- value={item.title}
114
- as="h3"
115
- className="text-2xl font-semibold tracking-[-0.02em] text-balance md:text-3xl"
116
- />
117
- <Text
118
- value={item.summary}
119
- as="p"
120
- className="text-muted-foreground mt-3 max-w-xl leading-relaxed whitespace-pre-line"
121
- />
122
- </div>
123
- <ArrowUpRight className="text-muted-foreground/40 group-hover:text-foreground ml-auto size-5 shrink-0 transition-all duration-300 group-hover:translate-x-1 group-hover:-translate-y-1" />
124
- </div>
125
- </a>
126
- </li>
127
- ))}
128
- </ul>
129
- </div>
130
- </section>
131
- );
132
- }
133
-
134
- export function ContentFallback({ loading }: { loading: boolean }) {
135
- return (
136
- <>
137
- <section aria-hidden className="border-border/70 border-b">
138
- <div className="mx-auto w-full max-w-6xl px-6 py-20 lg:px-10 lg:py-32">
139
- <Bar loading={loading} className="h-3 w-40" />
140
- <div className="mt-10 grid gap-12 lg:mt-14 lg:grid-cols-12 lg:gap-16">
141
- <div className="grid gap-4 lg:col-span-7">
142
- <Bar loading={loading} className="h-14 w-full lg:h-16" />
143
- <Bar loading={loading} className="h-14 w-5/6 lg:h-16" />
144
- <Bar loading={loading} className="h-14 w-2/3 lg:h-16" />
145
- </div>
146
- <div className="grid gap-3 lg:col-span-5 lg:pt-3">
147
- <Bar loading={loading} className="h-4 w-full max-w-md" />
148
- <Bar loading={loading} className="h-4 w-11/12 max-w-md" />
149
- <Bar loading={loading} className="h-4 w-3/4 max-w-md" />
150
- <Bar loading={loading} className="mt-7 h-10 w-48" />
151
- </div>
152
- </div>
153
- </div>
154
- </section>
155
-
156
- <section aria-hidden className="border-border/70 border-b">
157
- <div className="mx-auto w-full max-w-6xl px-6 lg:px-10">
158
- <Bar loading={loading} className="mt-16 h-3 w-28 lg:mt-24" />
159
- <ul className="divide-border/70 border-border/70 mt-8 divide-y border-t">
160
- {[0, 1, 2].map((row) => (
161
- <li key={row} className="grid gap-5 py-10 md:grid-cols-12 md:gap-8 md:py-14">
162
- <Bar loading={loading} className="h-4 w-32 md:col-span-4" />
163
- <div className="grid gap-3 md:col-span-8">
164
- <Bar loading={loading} className="h-8 w-3/4" />
165
- <Bar loading={loading} className="h-4 w-full max-w-xl" />
166
- <Bar loading={loading} className="h-4 w-2/3 max-w-xl" />
167
- </div>
168
- </li>
169
- ))}
170
- </ul>
171
- </div>
172
- </section>
173
- </>
174
- );
175
- }
176
-
177
- /** Pulses while the request is in flight; settles into a static block once it is not. */
178
- export function Bar({ loading, className }: { loading: boolean; className: string }) {
179
- return loading ? <Skeleton className={className} /> : <div className={cn('bg-muted rounded-md', className)} />;
180
- }
181
-
182
- function Mark() {
183
- return (
184
- <span aria-hidden className="grid size-5 shrink-0 grid-cols-2 gap-[3px]">
185
- <span className="bg-foreground rounded-[2px]" />
186
- <span className="bg-foreground/25 rounded-[2px]" />
187
- <span className="bg-foreground/25 rounded-[2px]" />
188
- <span className="bg-primary rounded-[2px]" />
189
- </span>
190
- );
191
- }
@@ -1,28 +0,0 @@
1
- {
2
- "uid": "HomePage",
3
- "name": "Home page",
4
- "isSingleton": true,
5
- "i18n": { "enabled": false },
6
- "fields": {
7
- "eyebrow": { "type": "string", "required": true },
8
- "title": { "type": "string", "required": true },
9
- "intro": { "type": "richtext", "required": true },
10
- "primaryCtaLabel": { "type": "string", "required": true },
11
- "primaryCtaHref": { "type": "string", "required": true },
12
- "featured": {
13
- "type": "blocks",
14
- "min": 1,
15
- "max": 3,
16
- "schema": {
17
- "fields": {
18
- "label": { "type": "string", "required": true },
19
- "title": { "type": "string", "required": true },
20
- "summary": { "type": "text", "required": true },
21
- "href": { "type": "string", "required": true }
22
- }
23
- }
24
- },
25
- "contactHeading": { "type": "string", "required": true },
26
- "contactIntro": { "type": "text", "required": true }
27
- }
28
- }
@@ -1,29 +0,0 @@
1
- // AUTO-GENERATED by `fimo` from src/schemas/HomePage.json - DO NOT EDIT.
2
- // Change content fields in the schema, then run `fimo validate`.
3
- // Runtime implementation lives in the project-local fimo-react package.
4
- import { createSingletonClient } from 'fimo-react';
5
- import type { ContentSchema, SingletonContentClient } from 'fimo-react';
6
-
7
- import schema from './HomePage.json';
8
- import type { HomePage, HomePageInput } from './HomePage.types';
9
-
10
- export type {
11
- HomePage,
12
- HomePageFields,
13
- HomePageFimoMeta,
14
- HomePageInput,
15
- HomePagePopulate,
16
- HomePageQuery,
17
- HomePageReferences,
18
- HomePageResult,
19
- HomePageSort,
20
- HomePageWhere,
21
- } from './HomePage.types';
22
-
23
- const client: SingletonContentClient<HomePage, HomePageInput> = createSingletonClient<HomePage, HomePageInput>({
24
- schema: schema as unknown as ContentSchema,
25
- });
26
-
27
- export const { get, update, useGet, useSuspenseGet, useUpdate, wrapWithSource, meta } = client;
28
-
29
- export default client;
@@ -1,64 +0,0 @@
1
- // AUTO-GENERATED ⚠️ – do not edit by hand
2
- import {
3
- type Fields,
4
- type FimoRichText,
5
- type FimoRichTextContent,
6
- type FimoString,
7
- type Populate,
8
- type PopulatedResult,
9
- type ProjectedWithPopulate,
10
- type Query,
11
- type Sort,
12
- type Where,
13
- type WithReferences,
14
- } from 'fimo-react';
15
-
16
- export interface HomePageFimoMeta {
17
- contentType: string;
18
- }
19
-
20
- export interface HomePage extends WithReferences<HomePageReferences> {
21
- id: string;
22
- entryId: string;
23
- documentId: string;
24
- slug: FimoString;
25
- locale?: string;
26
- createdAt: string;
27
- updatedAt: string;
28
- __fimo: HomePageFimoMeta;
29
- eyebrow: FimoString;
30
- title: FimoString;
31
- intro: FimoRichText;
32
- primaryCtaLabel: FimoString;
33
- primaryCtaHref: FimoString;
34
- featured: { _key: string; label: string; title: string; summary: string; href: string }[];
35
- contactHeading: FimoString;
36
- contactIntro: FimoString;
37
- }
38
-
39
- export interface HomePageInput {
40
- slug?: string;
41
- eyebrow: string;
42
- title: string;
43
- intro: FimoRichTextContent;
44
- primaryCtaLabel: string;
45
- primaryCtaHref: string;
46
- featured: { _key?: string; label: string; title: string; summary: string; href: string }[];
47
- contactHeading: string;
48
- contactIntro: string;
49
- }
50
-
51
- export interface HomePageReferences {}
52
-
53
- export type HomePagePopulate = Populate<HomePage>;
54
- export type HomePageWhere = Where<HomePage>;
55
- export type HomePageSort = Sort<HomePage>;
56
- export type HomePageFields = Fields<HomePage>;
57
- export type HomePageQuery<
58
- TFields extends HomePageFields | undefined = HomePageFields | undefined,
59
- TPopulate extends HomePagePopulate | undefined = HomePagePopulate | undefined,
60
- > = Query<HomePage, TFields, TPopulate>;
61
- export type HomePageResult<
62
- TFields extends HomePageFields | undefined = undefined,
63
- TPopulate extends HomePagePopulate | undefined = undefined,
64
- > = ProjectedWithPopulate<PopulatedResult<HomePage, TPopulate>, TFields, TPopulate>;