Skip to content

Commit ba51b19

Browse files
authored
Bump watch/publish. (#80)
1 parent 6549f96 commit ba51b19

5 files changed

Lines changed: 32 additions & 33 deletions

File tree

bun.lock

Lines changed: 22 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
"fix": "biome check --write && bun audit fix"
1414
},
1515
"dependencies": {
16-
"@moq/publish": "^0.1.1",
17-
"@moq/watch": "^0.1.1",
18-
"astro": "^5.17.3",
16+
"@moq/publish": "^0.2.2",
17+
"@moq/watch": "^0.2.2",
18+
"astro": "^5.18.0",
1919
"solid-js": "^1.9.11",
2020
"unique-names-generator": "^4.7.1"
2121
},
@@ -27,10 +27,10 @@
2727
"@biomejs/biome": "^2.4.4",
2828
"@tailwindcss/forms": "^0.5.11",
2929
"@tailwindcss/typography": "^0.5.19",
30-
"@types/node": "^22.19.11",
30+
"@types/node": "^22.19.13",
3131
"tailwindcss": "^3.4.19",
3232
"vite-plugin-static-copy": "^2.3.2",
33-
"wrangler": "^4.67.0"
33+
"wrangler": "^4.69.0"
3434
},
3535
"packageManager": "bun@1.3.4"
3636
}

src/components/publish.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { adjectives, animals, uniqueNamesGenerator } from "unique-names-generato
44
import "@moq/publish/support/element";
55
import "@moq/publish/element";
66
import "@moq/publish/ui";
7+
import { Lite } from "@moq/publish";
78

89
export default function () {
910
const name = uniqueNamesGenerator({ dictionaries: [adjectives, animals], separator: "-" });
@@ -52,7 +53,7 @@ export default function () {
5253
</div>
5354

5455
<moq-publish-ui>
55-
<moq-publish attr:url={url.toString()} attr:path={name} attr:source="camera">
56+
<moq-publish prop:url={url} prop:name={Lite.Path.from(name)} prop:source="camera">
5657
<video
5758
style={{ "max-width": "100%", height: "100%", margin: "0 auto", "border-radius": "1rem" }}
5859
autoplay

src/components/watch.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import "@moq/watch/support/element";
33
import "@moq/watch/element";
44
import "@moq/watch/ui";
5+
import { Lite } from "@moq/watch";
56
import { Show } from "solid-js";
67

78
export default function () {
@@ -25,7 +26,7 @@ export default function () {
2526
</a>
2627
</div>
2728
<moq-watch-ui>
28-
<moq-watch attr:url={url.toString()} attr:path={name} attr:muted="" attr:reload="">
29+
<moq-watch prop:url={url} prop:name={Lite.Path.from(name)} prop:muted={true} prop:reload={true}>
2930
<canvas style={{ "max-width": "100%", height: "auto", margin: "0 auto", "border-radius": "1rem" }} />
3031
</moq-watch>
3132
</moq-watch-ui>

src/elements.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@
22
// See: https://github.com/solidjs/solid/issues/616#issuecomment-1144074821
33
declare module "solid-js" {
44
namespace JSX {
5-
type Attrs = {
6-
// Allow setting any HTML attribute via Solid's attr: prefix
7-
[key: `attr:${string}`]: string | undefined;
8-
};
95
type ElementProps<T> = {
10-
// Add both the element's prefixed properties and the attributes
11-
[K in keyof T]: Props<T[K]> & HTMLAttributes<T[K]> & Attrs;
6+
[K in keyof T]: Props<T[K]> & HTMLAttributes<T[K]>;
127
};
138
// Prefixes all properties with `prop:` to match Solid's property setting syntax
149
type Props<T> = {

0 commit comments

Comments
 (0)