create-feltkit 0.3.21 → 0.3.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-feltkit",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
4
4
  "description": "Create a FeltKit application: npm create feltkit@latest my-app (add -- --template managed for Managed FeltDB)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,6 +37,6 @@
37
37
  },
38
38
  "homepage": "https://www.npmjs.com/package/create-feltkit",
39
39
  "dependencies": {
40
- "@feltdb/feltkit": "0.3.21"
40
+ "@feltdb/feltkit": "0.3.22"
41
41
  }
42
42
  }
@@ -13,7 +13,7 @@
13
13
  "typecheck": "tsc --noEmit"
14
14
  },
15
15
  "dependencies": {
16
- "@feltdb/feltkit": "0.3.21",
16
+ "@feltdb/feltkit": "0.3.22",
17
17
  "react": "19.2.0",
18
18
  "react-dom": "19.2.0"
19
19
  },
@@ -16,7 +16,7 @@
16
16
  "compose:plan": "feltkit compose plan"
17
17
  },
18
18
  "dependencies": {
19
- "@feltdb/feltkit": "0.3.21",
19
+ "@feltdb/feltkit": "0.3.22",
20
20
  "react": "19.2.0",
21
21
  "react-dom": "19.2.0"
22
22
  },
@@ -1,16 +1,21 @@
1
1
  /**
2
2
  * The app shell. Sign-in, invitations, workspaces, members and account settings are FeltKit's
3
3
  * components, driven by the foundation `feltkit create` composed; this file only arranges them.
4
- * Your own screens go where <Home /> is: query and mutate your collections through
5
- * feltkit/_generated/api (run `npx feltkit codegen` after adding functions under feltkit/).
4
+ * <DataScreens /> is the generated screens for the entities this application composed — the records, a form
5
+ * that creates one, inline editing and a delete, each through the generated functions. It is regenerated when
6
+ * the composition changes. Your own screens go here beside it, through feltkit/_generated/api (run
7
+ * `npx feltkit codegen` after adding functions under feltkit/).
6
8
  */
7
9
  import { useState } from "react";
10
+ import { DataScreens } from "../feltkit/_generated/screens.js";
8
11
  import {
9
12
  AcceptInvitation, AccountSettings, AuthNotices, CreateTenant, SignIn, TenantSettings, TenantSwitcher, VerifyEmailBanner,
10
13
  useAuth, useAuthRedirect, useTenant,
11
14
  } from "@feltdb/feltkit/react";
12
15
 
13
16
  type View = "home" | "workspace" | "account";
17
+ /** "an owner", not "a owner": the role is a runtime value, so the article is chosen at runtime. */
18
+ const article = (word: string) => (/^[aeiou]/i.test(word) ? "an" : "a");
14
19
  const BRAND = "foundation";
15
20
 
16
21
  export function App() {
@@ -54,7 +59,8 @@ function Home({ role }: { role: string }) {
54
59
  return (
55
60
  <section>
56
61
  <h1>Welcome</h1>
57
- <p className="muted">You are a {role} here. Accounts, workspaces, roles and invitations work already; the screens for your own data are yours to build.</p>
62
+ <p className="muted">You are {article(role)} {role} here. Accounts, workspaces, roles and invitations work already.</p>
63
+ <DataScreens />
58
64
  </section>
59
65
  );
60
66
  }
@@ -20,7 +20,7 @@
20
20
  "deploy:fly": "node scripts/deploy-fly.mjs"
21
21
  },
22
22
  "dependencies": {
23
- "@feltdb/feltkit": "0.3.21"
23
+ "@feltdb/feltkit": "0.3.22"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@feltdb/core": ">=0.21.0 <1.0.0",