@warlock.js/web 5.3.2 → 5.5.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/CHANGELOG.md +6 -0
- package/llms-full.txt +21 -18
- package/package.json +3 -3
- package/skills/add-web-to-an-app/SKILL.md +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@warlock.js/web` are documented here.
|
|
4
4
|
|
|
5
|
+
## 5.5.0 - 2026-09-07
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Documentation shipped in this package's `skills/` told users to run `pnpm`-specific commands. `pnpm <binary>` has no npm equivalent, so those instructions failed outright for anyone not using pnpm. Commands are now package-manager neutral.
|
|
10
|
+
|
|
5
11
|
## 5.3.2 - 2026-09-05
|
|
6
12
|
|
|
7
13
|
### Fixed
|
package/llms-full.txt
CHANGED
|
@@ -18,7 +18,7 @@ description: 'Install the SSR page layer with `warlock add web`: add React/Vite
|
|
|
18
18
|
## The shape
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
|
|
21
|
+
npx warlock add web
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
On the ordinary path it leaves this application-owned shape:
|
|
@@ -91,8 +91,8 @@ On the refusal path, free `/` yourself and create a page with either `route = {
|
|
|
91
91
|
Read the files rather than assuming the command could patch every application shape:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
npx warlock routes --method GET --path /
|
|
95
|
+
npx warlock routes --method GET --path /welcome
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
The desired result is one page route at `/` and, when the stock JSON route existed, one API route at `/welcome`.
|
|
@@ -696,12 +696,7 @@ import { Link } from "@warlock.js/web";
|
|
|
696
696
|
|
|
697
697
|
export function ProductLink({ id }: { id: string }) {
|
|
698
698
|
return (
|
|
699
|
-
<Link
|
|
700
|
-
to="products.details"
|
|
701
|
-
params={{ id }}
|
|
702
|
-
query={{ tab: "specifications" }}
|
|
703
|
-
prefetch
|
|
704
|
-
>
|
|
699
|
+
<Link to="products.details" params={{ id }} query={{ tab: "specifications" }} prefetch>
|
|
705
700
|
View product
|
|
706
701
|
</Link>
|
|
707
702
|
);
|
|
@@ -722,7 +717,9 @@ export function NavigationLinks() {
|
|
|
722
717
|
<nav>
|
|
723
718
|
<Link to="products.index">Products</Link>
|
|
724
719
|
<Link href="/pricing">Pricing</Link>
|
|
725
|
-
<Link href="https://example.com/docs" newTab>
|
|
720
|
+
<Link href="https://example.com/docs" newTab>
|
|
721
|
+
External docs
|
|
722
|
+
</Link>
|
|
726
723
|
<Link email="sales@example.com">Email sales</Link>
|
|
727
724
|
<Link tel="+201000000000">Call sales</Link>
|
|
728
725
|
</nav>
|
|
@@ -773,8 +770,12 @@ export function CheckoutButtons() {
|
|
|
773
770
|
|
|
774
771
|
return (
|
|
775
772
|
<div>
|
|
776
|
-
<button type="button" onClick={navigateBack}>
|
|
777
|
-
|
|
773
|
+
<button type="button" onClick={navigateBack}>
|
|
774
|
+
Back
|
|
775
|
+
</button>
|
|
776
|
+
<button type="button" onClick={openCheckout}>
|
|
777
|
+
Checkout
|
|
778
|
+
</button>
|
|
778
779
|
</div>
|
|
779
780
|
);
|
|
780
781
|
}
|
|
@@ -806,7 +807,11 @@ export function DeleteProductButton({ id }: { id: string }) {
|
|
|
806
807
|
}
|
|
807
808
|
};
|
|
808
809
|
|
|
809
|
-
return
|
|
810
|
+
return (
|
|
811
|
+
<button type="button" onClick={deleteProduct}>
|
|
812
|
+
Delete product
|
|
813
|
+
</button>
|
|
814
|
+
);
|
|
810
815
|
}
|
|
811
816
|
```
|
|
812
817
|
|
|
@@ -919,6 +924,7 @@ Use a bare side-effect import in `root.tsx`. In development the server parses th
|
|
|
919
924
|
|
|
920
925
|
Development has no client manifest, so Warlock reads `root.tsx`, finds bare stylesheet imports, resolves them relative to the root file, and emits a link before `</head>`:
|
|
921
926
|
|
|
927
|
+
<!-- prettier-ignore -->
|
|
922
928
|
```html
|
|
923
929
|
<link rel="stylesheet" href="/src/web/app.css?direct">
|
|
924
930
|
```
|
|
@@ -1039,14 +1045,11 @@ export const loader = (async () => {
|
|
|
1039
1045
|
};
|
|
1040
1046
|
}) satisfies LayoutLoader;
|
|
1041
1047
|
|
|
1042
|
-
export default function ProductsLayout({
|
|
1043
|
-
data,
|
|
1044
|
-
children,
|
|
1045
|
-
}: LayoutProps<typeof loader>) {
|
|
1048
|
+
export default function ProductsLayout({ data, children }: LayoutProps<typeof loader>) {
|
|
1046
1049
|
return (
|
|
1047
1050
|
<section>
|
|
1048
1051
|
<nav aria-label="Products">
|
|
1049
|
-
{data.navigation.map(item => (
|
|
1052
|
+
{data.navigation.map((item) => (
|
|
1050
1053
|
<a key={item.href} href={item.href}>
|
|
1051
1054
|
{item.label}
|
|
1052
1055
|
</a>
|
package/package.json
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"@vitejs/plugin-react": "^5.2.0",
|
|
15
|
-
"@warlock.js/core": "5.
|
|
16
|
-
"@warlock.js/seal": "5.
|
|
15
|
+
"@warlock.js/core": "5.5.0",
|
|
16
|
+
"@warlock.js/seal": "5.5.0",
|
|
17
17
|
"react": "*",
|
|
18
18
|
"react-dom": "*",
|
|
19
19
|
"vite": ">=7.3.5 <8"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"author": "hassanzohdy",
|
|
40
40
|
"license": "MIT",
|
|
41
|
-
"version": "5.
|
|
41
|
+
"version": "5.5.0",
|
|
42
42
|
"type": "module",
|
|
43
43
|
"main": "./esm/index.mjs",
|
|
44
44
|
"module": "./esm/index.mjs",
|
|
@@ -10,7 +10,7 @@ description: 'Install the SSR page layer with `warlock add web`: add React/Vite
|
|
|
10
10
|
## The shape
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
|
|
13
|
+
npx warlock add web
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
On the ordinary path it leaves this application-owned shape:
|
|
@@ -83,8 +83,8 @@ On the refusal path, free `/` yourself and create a page with either `route = {
|
|
|
83
83
|
Read the files rather than assuming the command could patch every application shape:
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
npx warlock routes --method GET --path /
|
|
87
|
+
npx warlock routes --method GET --path /welcome
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
The desired result is one page route at `/` and, when the stock JSON route existed, one API route at `/welcome`.
|