-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2f705a
commit 677d58b
Showing
723 changed files
with
1,028 additions
and
590 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
"test:www": "deno test -A tests/www/", | ||
"manifests": "deno run -A genAllManifest.ts" | ||
}, | ||
"exclude": ["**/_fresh/*", "**/tmp/*"], | ||
"exclude": ["**/_fresh/*", "**/tmp/*", "*/tests_OLD/**"], | ||
"publish": { | ||
"include": [ | ||
"src/**", | ||
|
@@ -44,7 +44,6 @@ | |
"@fresh/plugin-tailwind": "./plugin-tailwindcss/src/mod.ts", | ||
"@fresh/core/runtime": "./src/runtime/client/mod.tsx", | ||
"@fresh/core/runtime-dev": "./src/runtime/client/dev.ts", | ||
"@fresh/server": "./src/mod.ts", | ||
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3", | ||
"@preact/signals": "https://esm.sh/@preact/[email protected]?external=preact", | ||
"@std/cli": "jsr:@std/cli@^0.221.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Signal, useSignal } from "@preact/signals"; | ||
import { useEffect } from "preact/hooks"; | ||
|
||
export interface CounterProps { | ||
id?: string; | ||
count: Signal<number>; | ||
} | ||
|
||
export function Counter(props: CounterProps) { | ||
const active = useSignal(false); | ||
useEffect(() => { | ||
active.value = true; | ||
}, []); | ||
|
||
return ( | ||
<div id={props.id} class={active.value ? "ready" : ""}> | ||
<button class="decrement" onClick={() => props.count.value -= 1}> | ||
-1 | ||
</button> | ||
<p class="output">{props.count}</p> | ||
<button class="increment" onClick={() => props.count.value += 1}> | ||
+1 | ||
</button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import data from "./data.json" with { type: "json" }; | ||
|
||
export function JsonIsland() { | ||
return <pre>{JSON.stringify(data)}</pre>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ComponentChildren } from "preact"; | ||
import { Counter } from "./Counter.tsx"; | ||
import { useSignal } from "@preact/signals"; | ||
|
||
export interface MultipleProps { | ||
id?: string; | ||
children?: ComponentChildren; | ||
} | ||
|
||
export function Multiple1(props: MultipleProps) { | ||
const sig = useSignal(0); | ||
return <Counter id={props.id} count={sig} />; | ||
} | ||
export function Multiple2(props: MultipleProps) { | ||
const sig = useSignal(0); | ||
return <Counter id={props.id} count={sig} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useEffect } from "preact/hooks"; | ||
|
||
export function NullIsland() { | ||
useEffect(() => { | ||
const div = document.createElement("div"); | ||
div.className = "ready"; | ||
document.body.appendChild(div); | ||
}, []); | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"foo": 123 | ||
} |
Oops, something went wrong.