forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sveltejs/zxbodya-ts-resolved
Resolve merge conflicts
- Loading branch information
Showing
23 changed files
with
205 additions
and
20 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
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,4 @@ | ||
export function get(req, res) { | ||
res.writeHead(302, { Location: 'https://github.com/sveltejs/svelte/wiki/FAQ' }); | ||
res.end(); | ||
} |
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,69 @@ | ||
/* generated by Svelte vX.Y.Z */ | ||
import { | ||
SvelteComponent, | ||
detach, | ||
element, | ||
init, | ||
insert, | ||
listen, | ||
noop, | ||
safe_not_equal | ||
} from "svelte/internal"; | ||
|
||
function create_fragment(ctx) { | ||
var details, dispose; | ||
|
||
return { | ||
c() { | ||
details = element("details"); | ||
details.innerHTML = `<summary>summary</summary>content | ||
`; | ||
dispose = listen(details, "toggle", ctx.details_toggle_handler); | ||
}, | ||
|
||
m(target, anchor) { | ||
insert(target, details, anchor); | ||
|
||
details.open = ctx.open; | ||
}, | ||
|
||
p(changed, ctx) { | ||
if (changed.open) details.open = ctx.open; | ||
}, | ||
|
||
i: noop, | ||
o: noop, | ||
|
||
d(detaching) { | ||
if (detaching) { | ||
detach(details); | ||
} | ||
|
||
dispose(); | ||
} | ||
}; | ||
} | ||
|
||
function instance($$self, $$props, $$invalidate) { | ||
let { open } = $$props; | ||
|
||
function details_toggle_handler() { | ||
open = this.open; | ||
$$invalidate('open', open); | ||
} | ||
|
||
$$self.$set = $$props => { | ||
if ('open' in $$props) $$invalidate('open', open = $$props.open); | ||
}; | ||
|
||
return { open, details_toggle_handler }; | ||
} | ||
|
||
class Component extends SvelteComponent { | ||
constructor(options) { | ||
super(); | ||
init(this, options, instance, create_fragment, safe_not_equal, ["open"]); | ||
} | ||
} | ||
|
||
export default Component; |
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,7 @@ | ||
<script> | ||
export let open; | ||
</script> | ||
|
||
<details bind:open={open}> | ||
<summary>summary</summary>content | ||
</details> |
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 |
---|---|---|
|
@@ -53,4 +53,4 @@ class Component extends SvelteComponentDev { | |
} | ||
} | ||
|
||
export default Component; | ||
export default Component; |
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,25 @@ | ||
export default { | ||
html: ` | ||
<details><summary>toggle</summary></details> | ||
`, | ||
|
||
async test({ assert, component, target, window }) { | ||
const details = target.querySelector('details'); | ||
const event = new window.Event('toggle'); | ||
|
||
details.open = true; | ||
await details.dispatchEvent(event); | ||
assert.equal(component.visible, true); | ||
assert.htmlEqual(target.innerHTML, ` | ||
<details open><summary>toggle</summary></details> | ||
<p>hello!</p> | ||
`); | ||
|
||
details.open = false; | ||
await details.dispatchEvent(event); | ||
assert.equal(component.visible, false); | ||
assert.htmlEqual(target.innerHTML, ` | ||
<details><summary>toggle</summary></details> | ||
`); | ||
} | ||
}; |
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,9 @@ | ||
<script> | ||
export let visible; | ||
</script> | ||
|
||
<details bind:open={visible}><summary>toggle</summary></details> | ||
|
||
{#if visible} | ||
<p>hello!</p> | ||
{/if} |
Oops, something went wrong.