@weft-js/create 0.1.0 → 0.1.2

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 (127) hide show
  1. package/README.md +60 -10
  2. package/bin/create-weft.mjs +62 -14
  3. package/package.json +26 -16
  4. package/scripts/tarballs.mjs +56 -6
  5. package/src/data.mjs +90 -18
  6. package/src/index.mjs +210 -51
  7. package/src/stack/pages.mjs +151 -0
  8. package/src/stack/schema.mjs +195 -0
  9. package/src/stack.mjs +102 -313
  10. package/src/templates.mjs +174 -0
  11. package/src/wizard.mjs +65 -16
  12. package/templates/admin/files/drizzle/.schema-hash +1 -0
  13. package/templates/admin/files/drizzle/0000_admin.sql +136 -0
  14. package/templates/admin/files/drizzle/meta/0000_snapshot.json +771 -0
  15. package/templates/admin/files/drizzle/meta/_journal.json +13 -0
  16. package/templates/admin/files/public/favicon.svg +1 -0
  17. package/templates/admin/files/src/auth.server.ts +24 -0
  18. package/templates/admin/files/src/components/AuthPage.tsx +33 -0
  19. package/templates/admin/files/src/components/Failed.tsx +19 -0
  20. package/templates/admin/files/src/components/Logo.tsx +16 -0
  21. package/templates/admin/files/src/components/OrderDetail.tsx +93 -0
  22. package/templates/admin/files/src/components/OrdersFilters.tsx +44 -0
  23. package/templates/admin/files/src/components/OrdersTable.tsx +144 -0
  24. package/templates/admin/files/src/components/Overview.tsx +113 -0
  25. package/templates/admin/files/src/components/StatusBadge.tsx +12 -0
  26. package/templates/admin/files/src/db/schema.ts +68 -0
  27. package/templates/admin/files/src/lib/orders.ts +60 -0
  28. package/templates/admin/files/src/routes/404.tsx +20 -0
  29. package/templates/admin/files/src/routes/_error.tsx +20 -0
  30. package/templates/admin/files/src/routes/_layout.tsx +6 -0
  31. package/templates/admin/files/src/routes/admin/_layout.tsx +89 -0
  32. package/templates/admin/files/src/routes/admin/index.tsx +45 -0
  33. package/templates/admin/files/src/routes/admin/nested/_layout.tsx +35 -0
  34. package/templates/admin/files/src/routes/admin/nested/index.tsx +77 -0
  35. package/templates/admin/files/src/routes/admin/orders/[id].tsx +24 -0
  36. package/templates/admin/files/src/routes/admin/orders/index.tsx +28 -0
  37. package/templates/admin/files/src/routes/admin/per-row.tsx +81 -0
  38. package/templates/admin/files/src/routes/admin/slow.tsx +74 -0
  39. package/templates/admin/files/src/routes/index.tsx +13 -0
  40. package/templates/admin/files/src/routes/login.tsx +53 -0
  41. package/templates/admin/files/src/routes/signup.tsx +60 -0
  42. package/templates/admin/files/src/server/orders.ts +193 -0
  43. package/templates/admin/files/src/server/reports.ts +92 -0
  44. package/templates/admin/files/src/server/session.ts +42 -0
  45. package/templates/admin/files/src/theme.css +43 -0
  46. package/templates/admin/files/weft.config.ts +31 -0
  47. package/templates/admin/template.json +22 -0
  48. package/templates/catalog/files/drizzle/.schema-hash +1 -0
  49. package/templates/catalog/files/drizzle/0000_catalog.sql +47 -0
  50. package/templates/catalog/files/drizzle/meta/0000_snapshot.json +263 -0
  51. package/templates/catalog/files/drizzle/meta/_journal.json +13 -0
  52. package/templates/catalog/files/public/favicon.svg +1 -0
  53. package/templates/catalog/files/seed.sql +13 -0
  54. package/templates/catalog/files/src/components/AddToCart.tsx +22 -0
  55. package/templates/catalog/files/src/components/Aisles.tsx +31 -0
  56. package/templates/catalog/files/src/components/CartLines.tsx +96 -0
  57. package/templates/catalog/files/src/components/CartLink.tsx +29 -0
  58. package/templates/catalog/files/src/components/Failed.tsx +19 -0
  59. package/templates/catalog/files/src/components/Featured.tsx +19 -0
  60. package/templates/catalog/files/src/components/Filters.tsx +40 -0
  61. package/templates/catalog/files/src/components/Logo.tsx +16 -0
  62. package/templates/catalog/files/src/components/ProductArt.tsx +42 -0
  63. package/templates/catalog/files/src/components/ProductCard.tsx +42 -0
  64. package/templates/catalog/files/src/components/ProductList.tsx +65 -0
  65. package/templates/catalog/files/src/components/Related.tsx +19 -0
  66. package/templates/catalog/files/src/components/SiteFooter.tsx +9 -0
  67. package/templates/catalog/files/src/components/SiteHeader.tsx +16 -0
  68. package/templates/catalog/files/src/db/schema.ts +53 -0
  69. package/templates/catalog/files/src/lib/catalog.ts +35 -0
  70. package/templates/catalog/files/src/routes/404.tsx +18 -0
  71. package/templates/catalog/files/src/routes/_error.tsx +18 -0
  72. package/templates/catalog/files/src/routes/_layout.tsx +14 -0
  73. package/templates/catalog/files/src/routes/c/[slug].tsx +53 -0
  74. package/templates/catalog/files/src/routes/cart.tsx +29 -0
  75. package/templates/catalog/files/src/routes/index.tsx +84 -0
  76. package/templates/catalog/files/src/routes/p/[slug].tsx +67 -0
  77. package/templates/catalog/files/src/server/cart.ts +125 -0
  78. package/templates/catalog/files/src/server/catalog.ts +107 -0
  79. package/templates/catalog/files/src/theme.css +159 -0
  80. package/templates/catalog/files/weft.config.ts +30 -0
  81. package/templates/catalog/template.json +20 -0
  82. package/templates/landing/files/.weft/plugins.lock.json +42 -0
  83. package/templates/landing/files/assets/fonts/LICENSE-figtree.txt +93 -0
  84. package/templates/landing/files/assets/fonts/figtree.woff2 +0 -0
  85. package/templates/landing/files/assets/hero.webp +0 -0
  86. package/templates/landing/files/drizzle/.schema-hash +1 -0
  87. package/templates/landing/files/drizzle/0000_landing.sql +6 -0
  88. package/templates/landing/files/drizzle/meta/0000_snapshot.json +60 -0
  89. package/templates/landing/files/drizzle/meta/_journal.json +13 -0
  90. package/templates/landing/files/public/favicon.svg +1 -0
  91. package/templates/landing/files/src/components/SiteFooter.tsx +24 -0
  92. package/templates/landing/files/src/components/SiteHeader.tsx +23 -0
  93. package/templates/landing/files/src/components/WaitlistForm.tsx +36 -0
  94. package/templates/landing/files/src/db/schema.ts +7 -0
  95. package/templates/landing/files/src/routes/404.tsx +24 -0
  96. package/templates/landing/files/src/routes/_error.tsx +24 -0
  97. package/templates/landing/files/src/routes/_layout.tsx +14 -0
  98. package/templates/landing/files/src/routes/index.tsx +130 -0
  99. package/templates/landing/files/src/routes/joined.tsx +30 -0
  100. package/templates/landing/files/src/routes/pricing.tsx +131 -0
  101. package/templates/landing/files/src/routes/privacy.tsx +56 -0
  102. package/templates/landing/files/src/server/waitlist.ts +13 -0
  103. package/templates/landing/files/src/theme.css +108 -0
  104. package/templates/landing/files/weft.config.ts +44 -0
  105. package/templates/landing/template.json +17 -0
  106. package/templates/todo/files/drizzle/.schema-hash +1 -0
  107. package/templates/todo/files/drizzle/0000_todo.sql +82 -0
  108. package/templates/todo/files/drizzle/meta/0000_snapshot.json +462 -0
  109. package/templates/todo/files/drizzle/meta/_journal.json +13 -0
  110. package/templates/todo/files/public/favicon.svg +1 -0
  111. package/templates/todo/files/src/components/AuthPage.tsx +33 -0
  112. package/templates/todo/files/src/components/Logo.tsx +14 -0
  113. package/templates/todo/files/src/components/NewTodo.tsx +27 -0
  114. package/templates/todo/files/src/components/TodoList.tsx +101 -0
  115. package/templates/todo/files/src/db/schema.ts +18 -0
  116. package/templates/todo/files/src/lib/views.ts +13 -0
  117. package/templates/todo/files/src/routes/404.tsx +20 -0
  118. package/templates/todo/files/src/routes/_error.tsx +20 -0
  119. package/templates/todo/files/src/routes/_layout.tsx +6 -0
  120. package/templates/todo/files/src/routes/index.tsx +13 -0
  121. package/templates/todo/files/src/routes/login.tsx +53 -0
  122. package/templates/todo/files/src/routes/signup.tsx +57 -0
  123. package/templates/todo/files/src/routes/todos.tsx +87 -0
  124. package/templates/todo/files/src/server/todos.ts +98 -0
  125. package/templates/todo/files/src/theme.css +71 -0
  126. package/templates/todo/files/weft.config.ts +30 -0
  127. package/templates/todo/template.json +18 -0
@@ -0,0 +1,107 @@
1
+ import { query } from '@weft-js/start'
2
+ import { and, asc, count, eq, gt, gte, lte, ne } from 'drizzle-orm'
3
+ import { z } from 'zod'
4
+ import { categories, products } from '#/db/schema'
5
+ import { PAGE_SIZE } from '#/lib/catalog'
6
+
7
+ const card = {
8
+ slug: products.slug,
9
+ name: products.name,
10
+ priceCents: products.priceCents,
11
+ stock: products.stock,
12
+ }
13
+
14
+ export type ProductCardRow = { slug: string; name: string; priceCents: number; stock: number }
15
+
16
+ // The aisles are on every page and hardly ever change.
17
+ export const listCategories = query({
18
+ tags: ['categories'],
19
+ cache: { life: 'hours' },
20
+ run: ({ ctx }) =>
21
+ ctx.db
22
+ .select({ slug: categories.slug, name: categories.name })
23
+ .from(categories)
24
+ .orderBy(asc(categories.id)),
25
+ })
26
+
27
+ export const getCategory = query({
28
+ input: z.object({ slug: z.string().max(200) }),
29
+ tags: ['categories'],
30
+ run: async ({ input, ctx }) => {
31
+ const [category] = await ctx.db.select().from(categories).where(eq(categories.slug, input.slug))
32
+ return category ?? null
33
+ },
34
+ })
35
+
36
+ export const featuredProducts = query({
37
+ tags: ['products'],
38
+ run: ({ ctx }) =>
39
+ ctx.db
40
+ .select(card)
41
+ .from(products)
42
+ .where(eq(products.featured, true))
43
+ .orderBy(asc(products.id))
44
+ .limit(12),
45
+ })
46
+
47
+ export const listProducts = query({
48
+ input: z.object({
49
+ categoryId: z.number().int().positive(),
50
+ min: z.number().int().min(0).nullable(),
51
+ max: z.number().int().min(0).nullable(),
52
+ stock: z.boolean(),
53
+ page: z.number().int().min(1),
54
+ }),
55
+ tags: ['products'],
56
+ run: async ({ input, ctx }) => {
57
+ const where = and(
58
+ eq(products.categoryId, input.categoryId),
59
+ input.min !== null ? gte(products.priceCents, input.min * 100) : undefined,
60
+ input.max !== null ? lte(products.priceCents, input.max * 100) : undefined,
61
+ input.stock ? gt(products.stock, 0) : undefined,
62
+ )
63
+ const [rows, [found]] = await Promise.all([
64
+ ctx.db
65
+ .select(card)
66
+ .from(products)
67
+ .where(where)
68
+ .orderBy(asc(products.priceCents), asc(products.id))
69
+ .limit(PAGE_SIZE)
70
+ .offset((input.page - 1) * PAGE_SIZE),
71
+ ctx.db.select({ total: count() }).from(products).where(where),
72
+ ])
73
+ return { rows, total: found!.total }
74
+ },
75
+ })
76
+
77
+ export const getProduct = query({
78
+ input: z.object({ slug: z.string().max(200) }),
79
+ tags: ['products', 'categories'],
80
+ run: async ({ input, ctx }) => {
81
+ const [product] = await ctx.db
82
+ .select({
83
+ ...card,
84
+ id: products.id,
85
+ description: products.description,
86
+ categoryId: products.categoryId,
87
+ categorySlug: categories.slug,
88
+ categoryName: categories.name,
89
+ })
90
+ .from(products)
91
+ .innerJoin(categories, eq(categories.id, products.categoryId))
92
+ .where(eq(products.slug, input.slug))
93
+ return product ?? null
94
+ },
95
+ })
96
+
97
+ export const relatedProducts = query({
98
+ input: z.object({ id: z.number().int().positive(), categoryId: z.number().int().positive() }),
99
+ tags: ['products'],
100
+ run: ({ input, ctx }) =>
101
+ ctx.db
102
+ .select(card)
103
+ .from(products)
104
+ .where(and(eq(products.categoryId, input.categoryId), ne(products.id, input.id)))
105
+ .orderBy(asc(products.id))
106
+ .limit(4),
107
+ })
@@ -0,0 +1,159 @@
1
+ /*
2
+ * Mendwell's own CSS, over warp's tokens. The oxblood, the gallery whites, the geometric type and the round corners are warp()
3
+ * options in weft.config.ts; this file is the shape of the pages and the material colours. Change those options first.
4
+ */
5
+ html { scroll-behavior: smooth; }
6
+ body { margin: 0; }
7
+ .site { display: flex; flex-direction: column; min-block-size: 100dvh; }
8
+ /* what this file's @container rules answer to */
9
+ .site > main { flex: 1; container-type: inline-size; }
10
+
11
+ .site-head {
12
+ position: sticky;
13
+ inset-block-start: 0;
14
+ z-index: 10;
15
+ display: flex;
16
+ justify-content: space-between;
17
+ align-items: center;
18
+ gap: var(--warp-space-group);
19
+ padding: var(--warp-space-related) max(var(--warp-space-page), calc((100% - var(--warp-layout-wide)) / 2 + var(--warp-space-page)));
20
+ background: var(--warp-color-page);
21
+ border-block-end: 1px solid var(--warp-color-border);
22
+ }
23
+ .site-foot {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ justify-content: space-between;
27
+ gap: var(--warp-space-related);
28
+ margin-block-start: var(--warp-space-page);
29
+ padding: var(--warp-space-group) max(var(--warp-space-page), calc((100% - var(--warp-layout-wide)) / 2));
30
+ border-block-start: 1px solid var(--warp-color-border);
31
+ }
32
+ .site-foot p { margin: 0; color: var(--warp-color-text-subtle); }
33
+
34
+ .brand {
35
+ display: inline-flex;
36
+ align-items: center;
37
+ gap: var(--warp-space-tight);
38
+ font-size: var(--warp-text-heading-size);
39
+ font-weight: var(--warp-text-heading-weight);
40
+ color: var(--warp-color-text);
41
+ text-decoration: none;
42
+ }
43
+ .logo { display: block; inline-size: 1.75rem; block-size: 1.75rem; flex: none; }
44
+
45
+ .cart-link {
46
+ min-inline-size: 5rem;
47
+ padding: var(--warp-space-tight) var(--warp-space-related);
48
+ border: 1px solid var(--warp-color-border);
49
+ border-radius: var(--warp-radius-round);
50
+ color: var(--warp-color-text);
51
+ font-variant-numeric: tabular-nums;
52
+ text-align: center;
53
+ text-decoration: none;
54
+ }
55
+ .cart-link:hover { border-color: var(--warp-color-accent-solid); color: var(--warp-color-accent-text); }
56
+
57
+ .page { padding-block: var(--warp-space-section) var(--warp-space-page); }
58
+ .crumb { color: var(--warp-color-text-subtle); font-size: var(--warp-text-caption-size); }
59
+
60
+ .hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--warp-space-section); align-items: center; padding-block: var(--warp-space-page); }
61
+ .lede { max-inline-size: 34rem; font-size: var(--warp-text-heading-size); line-height: var(--warp-text-body-leading); }
62
+ .hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: var(--warp-space-related); }
63
+ .hero-art .art:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
64
+ @container (max-width: 760px) { .hero { grid-template-columns: 1fr; } }
65
+
66
+ .cta {
67
+ justify-self: start;
68
+ inline-size: fit-content;
69
+ padding: var(--warp-space-related) var(--warp-space-group);
70
+ border-radius: var(--warp-radius-round);
71
+ background: var(--warp-color-accent-solid);
72
+ color: var(--warp-color-accent-on-solid);
73
+ font-weight: var(--warp-text-heading-weight);
74
+ text-decoration: none;
75
+ }
76
+ .cta:hover { background: var(--warp-color-accent-solid-hover); }
77
+
78
+ /* Aisles read as a ruled index on the home page, and as a scrolling strip beside a category */
79
+ .aisles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); border-block-start: 2px solid var(--warp-color-text); }
80
+ .aisles a {
81
+ padding-block: var(--warp-space-related);
82
+ border-block-end: 1px solid var(--warp-color-border);
83
+ color: var(--warp-color-text);
84
+ font-size: var(--warp-text-heading-size);
85
+ font-weight: var(--warp-text-heading-weight);
86
+ text-decoration: none;
87
+ }
88
+ .aisles a:hover { color: var(--warp-color-accent-text); }
89
+ .aisles[data-compact] { display: flex; gap: var(--warp-space-tight); overflow-x: auto; border: 0; }
90
+ .aisles[data-compact] a {
91
+ flex: none;
92
+ padding: var(--warp-space-tight) var(--warp-space-related);
93
+ border: 1px solid var(--warp-color-border);
94
+ border-radius: var(--warp-radius-round);
95
+ font-size: var(--warp-text-body-size);
96
+ font-weight: inherit;
97
+ }
98
+ .aisles[data-compact] a[aria-current="page"] { background: var(--warp-color-text); border-color: var(--warp-color-text); color: var(--warp-color-page); }
99
+
100
+ .product { display: flex; flex-direction: column; gap: var(--warp-space-tight); color: var(--warp-color-text); text-decoration: none; }
101
+ .product:hover .product-name { color: var(--warp-color-accent-text); }
102
+ .product:hover .art svg { transform: translateY(-3px); }
103
+ .product [data-shape="block"] { aspect-ratio: 1; }
104
+ .product-foot { display: flex; align-items: center; gap: var(--warp-space-tight); }
105
+ .price { font-weight: var(--warp-text-heading-weight); font-variant-numeric: tabular-nums; }
106
+ .price-lg { font-size: var(--warp-text-title-size); }
107
+
108
+ .art {
109
+ --ink: #6f665c;
110
+ --ground: light-dark(#ebe7df, #2a2624);
111
+ display: grid;
112
+ place-items: center;
113
+ aspect-ratio: 1;
114
+ border-radius: var(--warp-radius-surface);
115
+ background: var(--ground);
116
+ overflow: hidden;
117
+ }
118
+ .art svg { display: block; inline-size: 62%; max-block-size: 80%; fill: var(--ink); transition: transform 160ms ease; }
119
+ @media (prefers-reduced-motion: reduce) { .art svg { transition: none; } }
120
+ .art[data-material="oak"] { --ink: #a9793f; --ground: light-dark(#f1e6d3, #2e261a); }
121
+ .art[data-material="linen"] { --ink: #9b9077; --ground: light-dark(#f2eee2, #2a2822); }
122
+ .art[data-material="copper"] { --ink: #b4602f; --ground: light-dark(#f6e3d6, #331f15); }
123
+ .art[data-material="slate"] { --ink: #56636f; --ground: light-dark(#e2e6ea, #20262c); }
124
+ .art[data-material="walnut"] { --ink: #5f4030; --ground: light-dark(#ebdfd6, #2b211c); }
125
+ .art[data-material="cedar"] { --ink: #a2472e; --ground: light-dark(#f4dfd6, #311c16); }
126
+ .art[data-material="ceramic"] { --ink: #4f8a8b; --ground: light-dark(#dcecec, #1a2a2a); }
127
+ .art[data-material="brass"] { --ink: #a78a2c; --ground: light-dark(#f4edcf, #2d2912); }
128
+
129
+ .filters { position: sticky; inset-block-start: 5rem; align-self: start; }
130
+ .price-range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--warp-space-tight); }
131
+
132
+ .blank { padding-block: var(--warp-space-section); align-items: start; }
133
+
134
+ .pager { display: flex; align-items: center; justify-content: space-between; gap: var(--warp-space-related); }
135
+ .pager [aria-disabled="true"] { color: var(--warp-color-text-subtle); }
136
+
137
+ .detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--warp-space-section); align-items: start; }
138
+ @container (max-width: 760px) { .detail { grid-template-columns: 1fr; } }
139
+ .form-error { margin: 0; color: var(--warp-color-critical-text); font-size: var(--warp-text-caption-size); }
140
+ .form-error:empty, .added:empty { display: none; }
141
+ .added { margin: 0; color: var(--warp-color-positive-text); font-size: var(--warp-text-caption-size); }
142
+
143
+ .promises { padding-block-start: var(--warp-space-section); border-block-start: 2px solid var(--warp-color-text); }
144
+
145
+ .lines { list-style: none; margin: 0; padding: 0; }
146
+ .line {
147
+ display: grid;
148
+ grid-template-columns: 4.5rem minmax(0, 1fr) auto 5.5rem auto;
149
+ gap: var(--warp-space-related);
150
+ align-items: center;
151
+ padding-block: var(--warp-space-related);
152
+ border-block-end: 1px solid var(--warp-color-border);
153
+ }
154
+ .line .price { text-align: end; }
155
+ @container (max-width: 640px) { .line { grid-template-columns: 4.5rem minmax(0, 1fr) auto; } .line .stepper { grid-column: 2; } }
156
+ .stepper { display: inline-flex; align-items: center; gap: var(--warp-space-tight); font-variant-numeric: tabular-nums; }
157
+ .total { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--warp-text-heading-size); }
158
+
159
+ .system-page { min-block-size: 60dvh; justify-content: center; }
@@ -0,0 +1,30 @@
1
+ import { defineConfig } from '@weft-js/core/config'
2
+ import { warp } from '@weft-js/warp/plugin'
3
+
4
+ export default defineConfig({
5
+ site: {
6
+ name: 'Mendwell',
7
+ locale: 'en_US',
8
+ title: '%s · Mendwell',
9
+ description: 'Mendwell sells everyday goods made to be used hard and repaired when they wear.',
10
+ head: '<link rel="icon" href="/favicon.svg" type="image/svg+xml">',
11
+ },
12
+ plugins: [
13
+ warp({
14
+ seed: { accent: '#8a2435' },
15
+ dials: { expression: 'balanced', density: 'comfortable' },
16
+ radius: 'round',
17
+ fields: 'classic',
18
+ fonts: {
19
+ display: '"Avenir Next", "Century Gothic", Futura, ui-sans-serif, system-ui, sans-serif',
20
+ body: '"Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif',
21
+ },
22
+ tokens: {
23
+ '--warp-color-page': 'light-dark(#f7f6f3, #141213)',
24
+ '--warp-color-surface': 'light-dark(#fdfcfa, #1d1a1b)',
25
+ '--warp-color-surface-raised': 'light-dark(#ffffff, #231f20)',
26
+ '--warp-color-surface-sunken': 'light-dark(#f1efea, #0e0c0d)',
27
+ },
28
+ }),
29
+ ],
30
+ })
@@ -0,0 +1,20 @@
1
+ {
2
+ "requires": { "db": "postgres", "auth": false },
3
+ "pages": ["/", "/c/[slug]", "/p/[slug]", "/cart"],
4
+ "warp": {
5
+ "seed": { "accent": "#8a2435" },
6
+ "dials": { "expression": "balanced", "density": "comfortable" },
7
+ "radius": "round",
8
+ "fields": "classic",
9
+ "fonts": {
10
+ "display": "\"Avenir Next\", \"Century Gothic\", Futura, ui-sans-serif, system-ui, sans-serif",
11
+ "body": "\"Avenir Next\", \"Segoe UI\", ui-sans-serif, system-ui, sans-serif"
12
+ },
13
+ "tokens": {
14
+ "--warp-color-page": "light-dark(#f7f6f3, #141213)",
15
+ "--warp-color-surface": "light-dark(#fdfcfa, #1d1a1b)",
16
+ "--warp-color-surface-raised": "light-dark(#ffffff, #231f20)",
17
+ "--warp-color-surface-sunken": "light-dark(#f1efea, #0e0c0d)"
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "version": 1,
3
+ "plugins": {
4
+ "@weft-js/plugin-media": {
5
+ "version": null,
6
+ "integrity": null,
7
+ "permissions": [
8
+ "env:WEFT_MEDIA_DIR",
9
+ "fs.read:**/*.{png,jpg,jpeg,gif,webp,avif,svg,mp4,m4v,mov,webm,mkv,ogv,mp3,wav,flac,ogg,oga,opus,m4a,aac}",
10
+ "native",
11
+ "spawn:ssimulacra2"
12
+ ],
13
+ "provides": [
14
+ "media.build",
15
+ "media.server"
16
+ ],
17
+ "undeclared": []
18
+ },
19
+ "@weft-js/text": {
20
+ "version": null,
21
+ "integrity": null,
22
+ "permissions": [
23
+ "fs.read:**/*.{woff2,woff,ttf,otf}"
24
+ ],
25
+ "provides": [
26
+ "font.build"
27
+ ],
28
+ "undeclared": []
29
+ },
30
+ "@weft-js/warp": {
31
+ "version": null,
32
+ "integrity": null,
33
+ "permissions": [
34
+ "fs.read:node_modules/@weft-js/warp-core/**",
35
+ "fs.write:$TMPDIR/warp-seed-*",
36
+ "spawn:node"
37
+ ],
38
+ "provides": [],
39
+ "undeclared": []
40
+ }
41
+ }
42
+ }
@@ -0,0 +1,93 @@
1
+ Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree) Figtree-Italic[wght].ttf: Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1 @@
1
+ 204a1483d863f832
@@ -0,0 +1,6 @@
1
+ CREATE TABLE IF NOT EXISTS "waitlist" (
2
+ "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3
+ "email" text NOT NULL,
4
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
5
+ CONSTRAINT "waitlist_email_unique" UNIQUE("email")
6
+ );
@@ -0,0 +1,60 @@
1
+ {
2
+ "id": "9b1ae0da-72e2-4dd2-9669-a1794558fe77",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.waitlist": {
8
+ "name": "waitlist",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "email": {
19
+ "name": "email",
20
+ "type": "text",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "created_at": {
25
+ "name": "created_at",
26
+ "type": "timestamp with time zone",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "default": "now()"
30
+ }
31
+ },
32
+ "indexes": {},
33
+ "foreignKeys": {},
34
+ "compositePrimaryKeys": {},
35
+ "uniqueConstraints": {
36
+ "waitlist_email_unique": {
37
+ "name": "waitlist_email_unique",
38
+ "nullsNotDistinct": false,
39
+ "columns": [
40
+ "email"
41
+ ]
42
+ }
43
+ },
44
+ "policies": {},
45
+ "checkConstraints": {},
46
+ "isRLSEnabled": false
47
+ }
48
+ },
49
+ "enums": {},
50
+ "schemas": {},
51
+ "sequences": {},
52
+ "roles": {},
53
+ "policies": {},
54
+ "views": {},
55
+ "_meta": {
56
+ "columns": {},
57
+ "schemas": {},
58
+ "tables": {}
59
+ }
60
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1793541999257,
9
+ "tag": "0000_landing",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="15" fill="#c2410c"/></svg>
@@ -0,0 +1,24 @@
1
+ import { Link } from '@weft-js/start'
2
+
3
+ export function SiteFooter() {
4
+ return (
5
+ <footer class="site-foot">
6
+ <div class="wrap">
7
+ <div class="site-bar">
8
+ <div class="site-foot-brand">
9
+ <Link href="/" class="brand">
10
+ Emberline
11
+ </Link>
12
+ <p>Hear what customers keep asking for.</p>
13
+ </div>
14
+ <nav aria-label="Footer">
15
+ <Link href="/pricing">Pricing</Link>
16
+ <Link href="/privacy">Privacy</Link>
17
+ <Link href="mailto:hello@emberline.example">hello@emberline.example</Link>
18
+ </nav>
19
+ </div>
20
+ <p class="site-foot-legal">© 2026 Emberline. Built for teams that listen.</p>
21
+ </div>
22
+ </footer>
23
+ )
24
+ }
@@ -0,0 +1,23 @@
1
+ import { Link } from '@weft-js/start'
2
+
3
+ // Plain elements, not warp's Center and Row: nothing here runs, so nothing here has to ship.
4
+ export function SiteHeader() {
5
+ return (
6
+ <header class="site-head">
7
+ <div class="wrap site-bar">
8
+ <Link href="/" class="brand">
9
+ Emberline
10
+ </Link>
11
+ <div class="site-links">
12
+ <nav aria-label="Main">
13
+ <Link href="/pricing">Pricing</Link>
14
+ <Link href="/privacy">Privacy</Link>
15
+ </nav>
16
+ <Link href="/#join" class="cta" data-size="sm">
17
+ Get early access
18
+ </Link>
19
+ </div>
20
+ </div>
21
+ </header>
22
+ )
23
+ }
@@ -0,0 +1,36 @@
1
+ import { Form, type FormApi } from '@weft-js/start'
2
+ import { Alert, Button, Input, Stack, Text } from '@weft-js/warp'
3
+ import { joinWaitlist } from '#/server/waitlist'
4
+
5
+ export function WaitlistForm() {
6
+ return (
7
+ <Form of={joinWaitlist} class="waitlist">
8
+ {(form: FormApi) => (
9
+ <Stack gap="related">
10
+ {form.message.value && (
11
+ <Alert tone="critical" title="That didn't go through" live>
12
+ Your email wasn't saved. Please try again in a moment.
13
+ </Alert>
14
+ )}
15
+ <div class="waitlist-row">
16
+ <Input
17
+ label="Email"
18
+ type="email"
19
+ autocomplete="email"
20
+ required
21
+ {...form.field('email')}
22
+ value={String(form.value('email') ?? '')}
23
+ />
24
+ <Button type="submit" size="lg" loading={form.pending.value}>
25
+ Join
26
+ </Button>
27
+ </div>
28
+ <form.Error name="email" class="waitlist-error" />
29
+ <Text role="caption" subtle>
30
+ We'll write when your place comes up, and not before.
31
+ </Text>
32
+ </Stack>
33
+ )}
34
+ </Form>
35
+ )
36
+ }
@@ -0,0 +1,7 @@
1
+ import { pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core'
2
+
3
+ export const waitlist = pgTable('waitlist', {
4
+ id: uuid('id').primaryKey().defaultRandom(),
5
+ email: text('email').notNull().unique(),
6
+ createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
7
+ })
@@ -0,0 +1,24 @@
1
+ import { Link, type Meta } from '@weft-js/start'
2
+ import { Center, Heading, Stack, Text } from '@weft-js/warp'
3
+
4
+ export const meta: Meta = { title: 'Page not found' }
5
+
6
+ export default function NotFound() {
7
+ return (
8
+ <section class="page-head">
9
+ <Center max="narrow" gutter>
10
+ <Stack gap="group" align="center">
11
+ <Heading level={1} role="display">
12
+ We can't find that page
13
+ </Heading>
14
+ <Text class="lede" subtle>
15
+ The link may be old, or the address mistyped.
16
+ </Text>
17
+ <Link href="/" class="cta">
18
+ Back to the home page
19
+ </Link>
20
+ </Stack>
21
+ </Center>
22
+ </section>
23
+ )
24
+ }