Skip to content

Commit

Permalink
bumpup svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssota committed Jul 17, 2024
1 parent 918f2da commit 28df006
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 45 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@
"url": "https://github.com/ssssota/svelte-twc/issues"
},
"homepage": "https://github.com/ssssota/svelte-twc#readme",
"packageManager": "[email protected]",
"devDependencies": {
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@types/node": "^20.12.7",
"esbuild": "^0.20.2",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.2.3",
"svelte": "5.0.0-next.151",
"svelte": "5.0.0-next.189",
"tsx": "^4.7.2",
"typescript": "^5.4.5",
"vite": "^5.2.10"
},
"peerDependencies": {
"svelte": ">=5.0.0-next.151",
"svelte": ">=5.0.0-next.189",
"vite": ">=2.0.0"
},
"files": [
"dist"
]
],
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
}
72 changes: 36 additions & 36 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"highlight.js": "^11.9.0",
"postcss": "^8.4.38",
"rehype-highlight": "^7.0.0",
"svelte": "5.0.0-next.151",
"svelte": "5.0.0-next.189",
"svelte-check": "^3.6.9",
"svelte-twc": "workspace:*",
"tailwindcss": "^3.4.3",
Expand Down
12 changes: 10 additions & 2 deletions src/internal/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,20 @@ var root = $.template(`<${el}><!></${el}>`);
return function TwcComponent($$anchor, $$props) {
$.push($$props, true);

let props = $.rest_props($$props, ["children", "class"]);
let props = $.rest_props($$props, [
"$$slots",
"$$events",
"$$legacy",
"children",
"class"
]);

var div = root();
let attributes;
var node = $.child(div);

$.snippet(() => $$props.children, node);
$.snippet(node, () => $$props.children);
$.reset(div);

$.template_effect(() => attributes = $.set_attributes(
div,
Expand Down
4 changes: 2 additions & 2 deletions src/internal/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ return function TwcComponent($$payload, $$props) {
$$payload.out += `<${el}${$.spread_attributes({
...props,
class: options.compose(className, cls)
})}><!--[-->`;
})}>`;

children?.($$payload);
$$payload.out += `<!--]--></${el}>`;
$$payload.out += `<!----></${el}>`;
$.pop();
}};
}
2 changes: 2 additions & 0 deletions src/svelte-internal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ declare module 'svelte/internal/*' {
declare function append(...values: any[]): any;
declare function snippet(...values: any[]): any;
declare function append(...values: any[]): any;
declare function reset(...values: any[]): any;
export {
append,
child,
pop,
push,
reset,
rest_props,
set_attributes,
snippet,
Expand Down

0 comments on commit 28df006

Please sign in to comment.