Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"fix": "biome check --write && bun audit fix"
},
"dependencies": {
"@moq/publish": "^0.1.1",
"@moq/watch": "^0.1.1",
"astro": "^5.17.3",
"@moq/publish": "^0.2.2",
"@moq/watch": "^0.2.2",
"astro": "^5.18.0",
"solid-js": "^1.9.11",
"unique-names-generator": "^4.7.1"
},
Expand All @@ -27,10 +27,10 @@
"@biomejs/biome": "^2.4.4",
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19",
"@types/node": "^22.19.11",
"@types/node": "^22.19.13",
"tailwindcss": "^3.4.19",
"vite-plugin-static-copy": "^2.3.2",
"wrangler": "^4.67.0"
"wrangler": "^4.69.0"
},
"packageManager": "bun@1.3.4"
}
3 changes: 2 additions & 1 deletion src/components/publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { adjectives, animals, uniqueNamesGenerator } from "unique-names-generato
import "@moq/publish/support/element";
import "@moq/publish/element";
import "@moq/publish/ui";
import { Lite } from "@moq/publish";

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

<moq-publish-ui>
<moq-publish attr:url={url.toString()} attr:path={name} attr:source="camera">
<moq-publish prop:url={url} prop:name={Lite.Path.from(name)} prop:source="camera">
<video
style={{ "max-width": "100%", height: "100%", margin: "0 auto", "border-radius": "1rem" }}
autoplay
Expand Down
3 changes: 2 additions & 1 deletion src/components/watch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import "@moq/watch/support/element";
import "@moq/watch/element";
import "@moq/watch/ui";
import { Lite } from "@moq/watch";
import { Show } from "solid-js";

export default function () {
Expand All @@ -25,7 +26,7 @@ export default function () {
</a>
</div>
<moq-watch-ui>
<moq-watch attr:url={url.toString()} attr:path={name} attr:muted="" attr:reload="">
<moq-watch prop:url={url} prop:name={Lite.Path.from(name)} prop:muted={true} prop:reload={true}>
<canvas style={{ "max-width": "100%", height: "auto", margin: "0 auto", "border-radius": "1rem" }} />
</moq-watch>
</moq-watch-ui>
Expand Down
7 changes: 1 addition & 6 deletions src/elements.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
// See: https://github.com/solidjs/solid/issues/616#issuecomment-1144074821
declare module "solid-js" {
namespace JSX {
type Attrs = {
// Allow setting any HTML attribute via Solid's attr: prefix
[key: `attr:${string}`]: string | undefined;
};
type ElementProps<T> = {
// Add both the element's prefixed properties and the attributes
[K in keyof T]: Props<T[K]> & HTMLAttributes<T[K]> & Attrs;
[K in keyof T]: Props<T[K]> & HTMLAttributes<T[K]>;
};
// Prefixes all properties with `prop:` to match Solid's property setting syntax
type Props<T> = {
Expand Down