Commit graph

14 commits

Author SHA1 Message Date
Josh Goldberg ✨
2fea174303
feat: use typescript-eslint@v6's reworked configs (#7425) 2023-07-03 20:59:43 +08:00
Augustine Kim
c7eb0d4310
Fix lit integration nested component rendering (#6752)
* Provide renderInfo to renderShadow

* Add test for rendering nested components

* Add changeset
2023-04-05 09:05:45 -04:00
Elliott Marquez
4b077318fb
Update lit-ssr dependency (#6681)
* update lit-ssr dependency

* delete unnecessary lit shim checks

* delete another unused lit shim feature

* fix sass build

* bump lit and polyfill versions to match ssr req

* shim HTMLElement in test

* remove lit global shim workarounds

* re-shim Astro's ce.define

* remove fix window test and shim HTML Element

* Update .changeset/gold-windows-fly.md

Co-authored-by: Augustine Kim <ajk830@gmail.com>

* fix window check test

* implement suggestoins

---------

Co-authored-by: Augustine Kim <ajk830@gmail.com>
2023-03-29 12:43:40 -04:00
natemoo-re
b0aca3c66a [ci] format 2023-02-24 18:13:07 +00:00
Reece McDonald
26bf12ef3c
[Lit] render DSD attributes based on shadowRootOptions (#6351)
* [Lit] render DSD attributes based on `shadowRootOptions`

## Changes

- Update `@astrojs/lit`’s `server.js` to properly render elements with `delegatesFocus: false` set in their `shadowRootOptions`.
- Logic is based on `@lit-labs/ssr` [latest implementation as found here](b0c3f82ef0/packages/labs/ssr/src/lib/render-value.ts (L738))

## Testing

A test was added to ensure an element with `delegatesFocus` set to true has this attribute properly included in the rendered static markup.

* chore: add changeset
2023-02-24 12:10:56 -06:00
Elliott Marquez
2567aa48bb
[Lit] Forwards compatiblity for streaming Declarative Shadow DOM (#6055)
* Forwards compatiblity for streaming DSD

* add shadowrootmode

* update tests

* add changeset
2023-02-01 08:44:56 -05:00
Elliott Marquez
0db2204153
[Lit] Fix hydration not having the same reactive values as server (#6080)
* Fix lit hydration not having the same reactive values

* add changeset

* add clientEntrypoint to package exports

* update tests

* add changeset

* only add defer-hydration when strictly necessary

* remove second changest

* fix test typos
2023-02-01 08:18:37 -05:00
matthewp
eebcf82ef2 [ci] format 2023-01-07 13:32:04 +00:00
Sebastiaan
f7aa1ec25d
[@astrojs/lit] Fix slotted content into main (#5791)
* Fix  add the missing slot attribute to child nodes

* Add lit slot tests

* Add changeset
2023-01-07 08:29:16 -05:00
Nate Moore
7373d61cdc
Enable named slots in renderers (#3652)
* feat: pass all slots to renderers

* refactor: pass `slots` as top-level props

* test: add named slot test for frameworks

* fix: nested hydration, slots that are not initially rendered

* test: add nested-recursive e2e test

* fix: render unmatched custom element children

* chore: update lockfile

* fix: unrendered slots for client:only

* fix(lit): ensure lit integration uses new slots API

* chore: add changeset

* chore: add changesets

* fix: lit slots

* feat: convert dash-case or snake_case slots to camelCase for JSX

* feat: remove tmpl special logic

* test: add slot components-in-markdown test

* refactor: prefer Object.entries.map() to for/of loop

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-23 10:10:54 -05:00
matthewp
948f82048b [ci] format 2022-06-21 12:33:55 +00:00
Matthew Phillips
f5afaf2498
Support re-exporting astro components containing client components (#3625)
* Support re-exporting astro components containing client components

* Include metadata for markdown too

* Fix ssr, probably

* Inject post-build

* Remove tagName custom element test

* Allows using the constructor for lit elements

* Fix hoisted script scanning

* Pass through plugin context

* Get edge functions working in the edge tests

* Fix types for the edge function integration

* Upgrade the compiler

* Upgrade compiler version

* Better release notes for lit

* Update .changeset/unlucky-hairs-camp.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Properly test that the draft was not rendered

* Prevent from rendering draft posts

* Add a changeset about the build perf improvement.

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-06-21 08:32:05 -04:00
Daniel Vivar
fe61e469b2
test(@astrojs/lit): adding tests (#3375)
* test(@astrojs/lit): adding tests

* changeset
2022-05-16 12:16:30 -04:00
Fred K. Schott
6386c14d00
Astro Integration System (#2820)
* update examples

* add initial integrations

* update tests

* update astro

* update ci

* get final tests working

* update injectelement todo

* update ben code review

* respond to final code review feedback
2022-03-18 15:35:45 -07:00