Skip to content

Commit 4d27f8f

Browse files
committed
Merge branch 'main' into threlte-hack
2 parents 958e804 + 5bf008e commit 4d27f8f

File tree

9 files changed

+295
-407
lines changed

9 files changed

+295
-407
lines changed

apps/svelte.dev/content/docs/svelte/03-template-syntax/06-snippet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Snippets can reference themselves and each other ([demo](/playground/untitled#H4
113113

114114
## Passing snippets to components
115115

116-
Within the template, snippets are values just like any other. As such, they can be passed to components as props ([demo](/playground/untitled#H4sIAAAAAAAAE41SwY6bMBD9lRGplKQlYRMpF5ZF7T_0ttmDwSZYJbZrT9pGlv-9g4Fkk-xhxYV5vHlvhjc-aWQnXJK_-kSxo0jy5IcxSZrg2fSF-yM6FFQ7fbJ1jxSuttJguVd7lEejLcJPVnUCGquPMF9nsVoPjfNnohGx1sohMU4SHbzAa4_t0UNvmcOcGUNDzFP4jeccdikYK2v6sIWQ3lErpui5cDdPF_LmkVy3wlp5Vd5e2U_rHYSe_kYjFtl1KeVnTkljBEIrGBd2sYy8AtsyLlBk9DYhJHtTR_UbBDWybkR8NkqHWyOr_y74ZMNLz9f9AoG6ePkOJLMHLBp-xISvcPf11r0YUuMM2Ysfkgngh5XphUYKkJWU_FFz2UjBkxztSYT0cihR4LOn0tGaPrql439N-7Uh0Dl8MVYbt1jeJ1Fg7xDb_Uw2Y18YQqZ_S2U5FH1pS__dCkWMa3C0uR0pfQRTg89kE4bLLLDS_Dxy_Eywuo1TAnPAw4fqY1rvtH3W9w35ZZMgvU3jq8LhedwkguCHRhT_cMU6eVA5dKLB5wGutCWjlTOslupAxxrxceKoD2hzhe2qbmXHF1v1bbOcNCtW_zpYfVI8h5kQ4qY3mueHTlesW2C7TOEO4hcdwzgf3Nc7cZxUKKC4yuNhvIX_MlV_Xk0EAAA=)):
116+
Within the template, snippets are values just like any other. As such, they can be passed to components as props ([demo](/playground/untitled#H4sIAAAAAAAAE3VS247aMBD9lZGpBGwDASRegonaPvQL2qdlH5zYEKvBNvbQLbL875VzAcKyj3PmzJnLGU8UOwqSkd8KJdaCk4TsZS0cyV49wYuJuQiQpGd-N2bu_ooaI1YwJ57hpVYoFDqSEepKKw3mO7VDeTTaIvxiRS1gb_URxvO0ibrS8WanIrHUyiHs7Vmigy28RmyHHmKvDMbMmFq4cQInvGSwTsBYWYoMVhCSB2rBFFPsyl0uruTlR3JZCWvlTXl1Yy_mawiR_rbZKZrellJ-5JQ0RiBUgnFhJ9OGR7HKmwVoilXeIye8DOJGfYCgRlZ3iE876TBsZPX7hPdteO75PC4QaIo8vwNPePmANQ2fMeEFHrLD7rR1jTNkW986E8C3KwfwVr8HSHOSEBT_kGRozyIkn_zQveXDL3rIfPJHtUDwzShJd_Qk3gQCbOGLsdq4yfTRJopRuin3I7nv6kL7ARRjmLdBDG3uv1mhuLA3V2mKtqNEf_oCn8p9aN-WYqH5peP4kWBl1UwJzAEPT9U7K--0fRrrWnPTXpCm1_EVdXjpNmlA8G1hPPyM1fKgMqjFHjctXGjLhZ05w0qpDhksGrybuNEHtJnCalZWsuaTlfq6nPaaBSv_HKw-K57BjzOiVj9ZKQYKzQjZodYFqydYTRN4gPhVzTDO2xnma3HsVWjaLjT8nbfwHy7Q5f2dBAAA)):
117117

118118
```svelte
119119
<script>
@@ -145,7 +145,7 @@ Within the template, snippets are values just like any other. As such, they can
145145

146146
Think about it like passing content instead of data to a component. The concept is similar to slots in web components.
147147

148-
As an authoring convenience, snippets declared directly _inside_ a component implicitly become props _on_ the component ([demo](/playground/untitled#H4sIAAAAAAAAE41Sy27bMBD8lYVcwHYrW4kBXxRFaP-htzgHSqQsojLJkuu2BqF_74qUrfhxCHQRh7MzO9z1SSM74ZL8zSeKHUSSJz-MSdIET2Y4uD-iQ0Fnp4-2HpDC1VYaLHdqh_JgtEX4yapOQGP1AebrLJzWsXD-QjQi1lo5JMZRooNXeBuwHXoYLHOYM2OoiXkKv_GUwzYFY2VNFxvo0xtqxRR9F-7z04X8fE-uW2GtnJQ3E_tpvYV-oL9Ti0U2hVJFjMMZslcfW-5DWj9zShojEFrBuLCLZR_9CmzLQCwy-psw8rxBgvkNhhpZd8F8NppE7Stbq_8u-GTKS8_XQ9Keqnl5BZP1AzTYP2bDV7i7_9hLEeda0iocNJeNFDzJ0R5Fn142JzA-uzsdBfLhldPxPdMhIPS0H1-M1cYtlnejwdBDfBXZjHXTFOg4BhuOtvTfrVDEmAZG2ew5ezYV-Ew2fVzVAivNTyPHzwSr29AlMAe8f6g-zuWDts-GusAmdBSkv3P7qnB4GpMEEHwsRPEPV6yTe5VDJxp8iXClLRmtnGG1VHva3oCPHQd9QJsrbFd1Kzu-2Khvz8uzZsXqX3urj4rnMBNCXNUG83zf6Yp1C2yXKdxA_KJjGOfRfb0Vh7MKDShEuV-M9_4_nq6svF4EAAA=)):
148+
As an authoring convenience, snippets declared directly _inside_ a component implicitly become props _on_ the component ([demo](/playground/untitled#H4sIAAAAAAAAE3VSTa_aMBD8Kyu_SkAbCA-JSzBR20N_QXt6vIMTO8SqsY29tI2s_PcqTiB8vaPHs7MzuxuIZgdBMvJLo0QlOElIJZXwJHsLBBvb_XUASc7Mb9Yu_B-hsMMK5sUzvDQahUZPMkJ96aTFfKd3KA_WOISfrFACKmcOMFmk8TWUTjY73RFLoz1C5U4SPWzhrcN2GKDrlcGEWauEnyRwxCaDdQLWyVJksII2uaMWTDPNLtzX5YX8-kgua-GcHJVXI3u5WEPb0d83O03TMZSmfRzOkG1Db7mNacOL19JagVALxoWbztq-H8U6j0SaYp2P2BGbOyQ2v8PQIFMXLKRDk177pq0zf6d8bMrzwBdd0pamyPMb-IjNEzS2f86Gz_Dwf-2F9nvNSUJQ_EOSoTuJNvngqK5v4Pas7n4-OCwlEEJcQTIMO-nSQwtb-GSdsX46e9gbRoP9yGQ11I0rEuycunu6PHx1QnPhxm3SFN15MOlYEFJZtf0dUywMbwZOeBGsrKNLYB54-1R9WNqVdki7usim6VmQphf7mnpshiQRhNAXdoOfMyX3OgMlKtz0cGEcF27uLSul3mewjPjgOOoDukxjPS9rqfh0pb-8zs6aBSt_7505aZ7B9xOi0T9YKW4UooVsr0zB1BTrWQJ3EL-oWcZ572GxFoezCk37QLe3897-B2i2U62uBAAA)):
149149

150150
```svelte
151151
<!-- this is semantically the same as the above -->
@@ -166,7 +166,7 @@ As an authoring convenience, snippets declared directly _inside_ a component imp
166166
</Table>
167167
```
168168

169-
Any content inside the component tags that is _not_ a snippet declaration implicitly becomes part of the `children` snippet ([demo](/playground/untitled#H4sIAAAAAAAAE41S247aMBD9lVFYCegGsiDxks1G7T_0bdkHJ3aI1cR27aEtsvzvtZ0LZeGhiiJ5js-cmTMemzS8YybJ320iSM-SPPmmVJImeFEhML9Yh8zHRp51HZDC1JorLI_iiLxXUiN8J1XHoNGyh-U2i9F2SFy-epon1lIY9IwzRwNv8B6wI1oIJXNYEqV8E8sUfuIlh0MKSvPaX-zBpZ-oFRH-m7m7l5m8uyfXLdOaX5X3V_bL9gAu0D98i0V2NSWKwQ4lSN7s0LKLbgtsyxgXmT9NiBe-iaP-DYISSTcj4bcLI7hSDEHL3yu6dkPfBdLS0m1o3nk-LW9gX-gBGss9ZsMXuLu32VjZBdfRaelft5eUN5zRJEd9Zi6dlyEy_ncdOm_IxsGlULe8o5qJNFgE5x_9SWmpzGp9N2-MXQxz4c2cOQ-lZWQyF0Jd2q_-mjI9U1fr4FBPE8iuKTbjjRt2sMBK0svIsQtG6jb2CsQAdQ_1x9f5R9tmIS-yPToK-tNkQRQGL6ObCIIdEpH9wQ3p-Enk0LEGXwe4ktoX2hhFai5Ofi0jPnYc9QF1LrDdRK-rvXjerSfNitQ_TlqeBc1hwRi7yY3F81MnK9KtsF2n8Amis44ilA7VtwfWTyr-kaKV-_X4cH8BTOhfRzcEAAA=)):
169+
Any content inside the component tags that is _not_ a snippet declaration implicitly becomes part of the `children` snippet ([demo](/playground/untitled#H4sIAAAAAAAAE3WOQQrCMBBFrzIMggql3ddY1Du4si5sOmIwnYRkFKX07lKqglqX8_7_w2uRDw1hjlsWI5ZqTPBoLEXMdy3K3fdZDzB5Ndfep_FKVnpWHSKNce1YiCVijirqYLwUJQOYxrsgsLmIOIZjcA1M02w4n-PpomSVvTclqyEutDX6DA2pZ7_ABIVugrmEC3XJH92P55_G39GodCmWBFrQJ2PrQAwdLGHig_NxNv9xrQa1dhWIawrv1Wzeqawa8953D-8QOmaEAQAA)):
170170

171171
```svelte
172172
<!--- file: App.svelte --->

apps/svelte.dev/content/docs/svelte/98-reference/.generated/compile-warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ Reassignments of module-level declarations will not cause reactive statements to
775775
```
776776

777777
```svelte
778-
<script ---context="module"--- +++context+++>
778+
<script ---context="module"--- +++module+++>
779779
let foo = 'bar';
780780
</script>
781781
```

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-compiler.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ namespace AST {
203203
options: SvelteOptions | null;
204204
fragment: Fragment;
205205
/** The parsed `<style>` element, if exists */
206-
css: Css.StyleSheet | null;
206+
css: AST.CSS.StyleSheet | null;
207207
/** The parsed `<script>` element, if exists */
208208
instance: Script | null;
209209
/** The parsed `<script module>` element, if exists */
@@ -546,6 +546,71 @@ namespace AST {
546546
content: Program;
547547
attributes: Attribute[];
548548
}
549+
550+
export type AttributeLike =
551+
| Attribute
552+
| SpreadAttribute
553+
| Directive;
554+
555+
export type Directive =
556+
| AST.AnimateDirective
557+
| AST.BindDirective
558+
| AST.ClassDirective
559+
| AST.LetDirective
560+
| AST.OnDirective
561+
| AST.StyleDirective
562+
| AST.TransitionDirective
563+
| AST.UseDirective;
564+
565+
export type Block =
566+
| AST.EachBlock
567+
| AST.IfBlock
568+
| AST.AwaitBlock
569+
| AST.KeyBlock
570+
| AST.SnippetBlock;
571+
572+
export type ElementLike =
573+
| AST.Component
574+
| AST.TitleElement
575+
| AST.SlotElement
576+
| AST.RegularElement
577+
| AST.SvelteBody
578+
| AST.SvelteBoundary
579+
| AST.SvelteComponent
580+
| AST.SvelteDocument
581+
| AST.SvelteElement
582+
| AST.SvelteFragment
583+
| AST.SvelteHead
584+
| AST.SvelteOptionsRaw
585+
| AST.SvelteSelf
586+
| AST.SvelteWindow
587+
| AST.SvelteBoundary;
588+
589+
export type Tag =
590+
| AST.ExpressionTag
591+
| AST.HtmlTag
592+
| AST.ConstTag
593+
| AST.DebugTag
594+
| AST.RenderTag;
595+
596+
export type TemplateNode =
597+
| AST.Root
598+
| AST.Text
599+
| Tag
600+
| ElementLike
601+
| AST.Attribute
602+
| AST.SpreadAttribute
603+
| Directive
604+
| AST.Comment
605+
| Block;
606+
607+
export type SvelteNode =
608+
| Node
609+
| TemplateNode
610+
| AST.Fragment
611+
| _CSS.Node;
612+
613+
export type { _CSS as CSS };
549614
}
550615
```
551616

apps/svelte.dev/content/docs/svelte/98-reference/30-compiler-warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ Reassignments of module-level declarations will not cause reactive statements to
796796
```
797797

798798
```svelte
799-
<script ---context="module"--- +++context+++>
799+
<script ---context="module"--- +++module+++>
800800
let foo = 'bar';
801801
</script>
802802
```

apps/svelte.dev/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@lezer/lr": "^1.3.10",
2323
"@rich_harris/svelte-split-pane": "^1.1.3",
2424
"@shikijs/twoslash": "^1.22.0",
25-
"@sveltejs/amp": "^1.1.3",
25+
"@sveltejs/amp": "^1.1.4",
2626
"@sveltejs/repl": "workspace:*",
2727
"@testing-library/dom": "^10.4.0",
2828
"@testing-library/svelte": "^5.2.3",
@@ -44,7 +44,7 @@
4444
"shiki": "^1.22.0",
4545
"topojson-client": "^3.1.0",
4646
"vitest": "^2.1.2",
47-
"ws": "^8.13.0",
47+
"ws": "^8.18.0",
4848
"yootils": "^0.3.1"
4949
},
5050
"devDependencies": {
@@ -53,15 +53,15 @@
5353
"@supabase/supabase-js": "^2.43.4",
5454
"@sveltejs/adapter-vercel": "^5.5.2",
5555
"@sveltejs/enhanced-img": "^0.4.3",
56-
"@sveltejs/kit": "^2.10.1",
56+
"@sveltejs/kit": "^2.11.0",
5757
"@sveltejs/site-kit": "workspace:*",
58-
"@sveltejs/vite-plugin-svelte": "4.0.0-next.6",
58+
"@sveltejs/vite-plugin-svelte": "4.0.3",
5959
"@types/cookie": "^0.6.0",
6060
"@types/node": "^20.14.2",
61-
"browserslist": "^4.23.1",
61+
"browserslist": "^4.24.2",
6262
"chokidar": "^4.0.1",
6363
"degit": "^2.8.4",
64-
"dotenv": "^16.4.5",
64+
"dotenv": "^16.4.7",
6565
"esbuild": "^0.21.5",
6666
"jimp": "^1.1.1",
6767
"lightningcss": "^1.25.1",
@@ -77,7 +77,7 @@
7777
"tiny-glob": "^0.2.9",
7878
"tsx": "^4.19.0",
7979
"typescript": "^5.5.4",
80-
"vite": "^5.4.7",
80+
"vite": "^5.4.11",
8181
"vite-imagetools": "^7.0.4"
8282
}
8383
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"changeset:publish": "changeset publish"
2424
},
2525
"devDependencies": {
26-
"@changesets/cli": "^2.27.6"
26+
"@changesets/cli": "^2.27.10"
2727
}
2828
}

packages/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"codemirror": "^6.0.1",
5555
"prettier": "^3.1.1",
5656
"prettier-plugin-svelte": "^3.1.2",
57-
"publint": "^0.2.0",
57+
"publint": "^0.2.12",
5858
"svelte": "^5.1.11",
5959
"svelte-check": "^4.1.1",
6060
"typescript": "^5.0.0",

packages/repl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@types/estree": "^1.0.5",
5656
"prettier": "^3.3.2",
5757
"prettier-plugin-svelte": "^3.2.4",
58-
"publint": "^0.1.9",
58+
"publint": "^0.2.12",
5959
"svelte-check": "^4.1.1",
6060
"typescript": "^5.5.4",
6161
"vite": "^5.4.3"

0 commit comments

Comments
 (0)