@lotics/cli 0.147.0 → 0.148.0
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/dist/src/cli.js +32 -16
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -46473,6 +46473,8 @@ import { useAiContext } from "@lotics/app-sdk";
|
|
|
46473
46473
|
import { Card } from "@lotics/ui/card";
|
|
46474
46474
|
import { Text } from "@lotics/ui/text";
|
|
46475
46475
|
import { Button } from "@lotics/ui/button";
|
|
46476
|
+
import { BackButton } from "@lotics/ui/back_button";
|
|
46477
|
+
import { EmptyState } from "@lotics/ui/empty_state";
|
|
46476
46478
|
|
|
46477
46479
|
// AppRouter makes the app's screens real URLs \u2014 write plain react-router
|
|
46478
46480
|
// (useNavigate / useParams / <Link>) and it handles both modes. The app owns its
|
|
@@ -46539,25 +46541,39 @@ function ItemDetailScreen() {
|
|
|
46539
46541
|
// what the app rendered to the member, never a channel for chat to pull app
|
|
46540
46542
|
// data \u2014 the text lands in the prompt as labeled data (not instructions) and
|
|
46541
46543
|
// any record refs would act only within the member's own IAM. Pass null to
|
|
46542
|
-
// clear the slot
|
|
46543
|
-
|
|
46544
|
-
|
|
46545
|
-
|
|
46546
|
-
);
|
|
46544
|
+
// clear the slot \u2014 which is what the scaffold does, deliberately.
|
|
46545
|
+
//
|
|
46546
|
+
// WIRE THIS when the screen shows real data:
|
|
46547
|
+
// useAiContext("item_detail", item ? { description: \`Viewing \${item.name}.\`,
|
|
46548
|
+
// data: { id: item.id } } : null);
|
|
46549
|
+
//
|
|
46550
|
+
// Left empty because these items are placeholders, and a filled slot is the
|
|
46551
|
+
// one thing here that reaches OUT of the app: it would seed the member's live
|
|
46552
|
+
// chat with a fact about a record that does not exist, invisibly, since
|
|
46553
|
+
// nothing on the screen shows what was pushed.
|
|
46554
|
+
useAiContext("item_detail", null);
|
|
46547
46555
|
return (
|
|
46548
46556
|
<Screen>
|
|
46549
|
-
{/*
|
|
46550
|
-
button walks app screens too).
|
|
46551
|
-
|
|
46552
|
-
|
|
46553
|
-
|
|
46557
|
+
{/* The kit's one go-back control; navigate(-1) walks the history (the
|
|
46558
|
+
browser Back button walks app screens too). Don't hand-roll it: a bare
|
|
46559
|
+
\`<Button title="Back">\` with no \`color\` draws NOTHING at rest \u2014 no
|
|
46560
|
+
ground, no border, no underline \u2014 so its only affordance is a hover
|
|
46561
|
+
wash, which touch and keyboard never see. BackButton also carries its
|
|
46562
|
+
own \`alignSelf\`, so it needs no wrapping View to sit left. */}
|
|
46563
|
+
<BackButton onPress={() => navigate(-1)} />
|
|
46554
46564
|
<Text size="xl" weight="semibold">{item ? item.name : "Not found"}</Text>
|
|
46555
|
-
|
|
46556
|
-
|
|
46557
|
-
|
|
46558
|
-
|
|
46559
|
-
|
|
46560
|
-
|
|
46565
|
+
{/* Every state gets its own content. Swapping only the TITLE left the card
|
|
46566
|
+
below still describing the record the title had just said was missing. */}
|
|
46567
|
+
{item ? (
|
|
46568
|
+
<Card>
|
|
46569
|
+
<View style={{ padding: 16, gap: 8 }}>
|
|
46570
|
+
<Text>Detail for item {id}.</Text>
|
|
46571
|
+
<Text color="muted">Reached via in-app navigation, not a host route.</Text>
|
|
46572
|
+
</View>
|
|
46573
|
+
</Card>
|
|
46574
|
+
) : (
|
|
46575
|
+
<EmptyState message={"No item with id " + id + "."} />
|
|
46576
|
+
)}
|
|
46561
46577
|
</Screen>
|
|
46562
46578
|
);
|
|
46563
46579
|
}
|