Commit Graph
65 Commits
Author SHA1 Message Date
Marvin Hagemeister fd235e877c feat: only enable partials when attribute is set (#1861) 2023-10-05 10:47:37 +02:00
Marvin Hagemeister add696faeb feat: support scroll restoration for partials (#1858) 2023-10-05 10:00:56 +02:00
Marvin Hagemeister 9018024b7e feat: collect partials deeply from response (#1860) 2023-10-04 22:33:27 +02:00
Marvin Hagemeister be1c15f8f3 fix: throw error when no partials found (#1853) 2023-10-04 15:38:43 +02:00
Marvin Hagemeister ea91687ea3 fix: active links outside partials not updated (#1852) 2023-10-04 15:07:27 +02:00
Marvin Hagemeister f2467229cc fix: use consistent partial attribute naming (#1847) 2023-10-04 12:35:29 +02:00
Marvin Hagemeister 4295dbe85d feat: mark active or ancestor links (#1840) 2023-10-02 18:22:44 +02:00
Marvin Hagemeister d638c526f5 fix: partial hash navigation causing loop (#1838) 2023-10-02 16:24:09 +02:00
Marvin Hagemeister 453cf0704e fix: docs islands not hydrated on safari 12 (#1837) 2023-10-02 10:26:16 +02:00
Marvin Hagemeister 665d35bbc2 Add Partials (#1824) 2023-09-27 13:34:30 +02:00
Marvin Hagemeister 78606477ec fix: show marker confusion (#1823) 2023-09-26 11:54:36 +02:00
Marvin Hagemeister 5a47ffaf59 fix: conditional island children not rendered (#1822) 2023-09-26 08:48:26 +02:00
Marvin Hagemeister 738a51ad52 chore: make it easier to debug markers (#1805) 2023-09-21 03:07:31 +02:00
Marvin Hagemeister 63c90ddc67 fix: wrong type for html boolean attrs (#1731) 2023-09-05 01:00:33 +02:00
Marvin HagemeisterandAsher Gomez 11077227b5 feat: support conditional island JSX children (#1355)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-08-08 11:35:28 +02:00
Roj d1e78095be www: consistently spell Fresh (#1504) 2023-07-22 13:02:31 +02:00
Marvin Hagemeister 5d07e6e9eb fix: island rendered outside of bounding markers (#1495) 2023-07-21 17:05:05 +02:00
Igor Brasileiro 82b0f2c95a fix: Prevent deserialize break on safari < 15.4 (#1483) 2023-07-19 19:52:55 +02:00
Reed von Redwitz a3f7c212f4 feat(server): multiple island exports (#1397) 2023-07-03 09:59:38 +02:00
Lautaro Suarez 582f56b033 chore: add function return type (#1370) 2023-07-01 19:30:13 +02:00
Marvin Hagemeister 2b92b1c526 fix: conditional sibling islands DOM order (#1324) 2023-06-26 13:57:05 +02:00
Lino Le Van 4d66f95ef6 feat: serialize bigints for islands (#1317) 2023-06-17 20:31:58 +02:00
Marvin Hagemeister ce0eda7654 feat: allow passing JSX children to island + nested islands (#1285) 2023-06-15 10:08:48 +02:00
Igor Brasileiro 273aa2ac5c feat: break island render task into to multiple tasks (#1019)
Each island is now rendered in a separate task. This significantly reduces blocking time.
2023-06-07 12:32:16 +02:00
Luca Casonato 38e67b0a97 feat: support passing Uint8Array as island props (#1225)
This commit adds support for passing Uint8Array's to islands in
component props.
2023-05-31 08:34:57 +00:00
Luca Casonato e3f9a0df08 feat: support passing signals as island props (#757)
This commit adds support for passing signals to islands in component
props. This is useful for passing around mutable state between islands.
The signal's value needs to be serializable for this to work.
2023-05-31 10:29:46 +02:00
Luca Casonato a6852fa58f feat: more advanced prop serializer for islands (#1224)
This commit adds support for an advanced (de)serializer that is used
for page state (island props and plugin state). This new serializer
supports maintaining references (thus supporting circular objects,
and multi-referenced objects).

This is a pre-requisite for allowing to pass signals, JSX, Uint8Arrays,
Date, and many other "advanced" values.
2023-05-31 10:12:07 +02:00
Luca CasonatoandAsher Gomez 87b087e358 fix: __FRSH_BUILD_ID is not defined (#1207)
This could happen if the runtime/utils.ts coe was loaded
prior to server/constants.ts, because they had some shared state on
`globalThis`.

I have mitigated this by not relying on global state anymore.

Fixes #1191

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-05-30 10:46:44 +10:00
azerumandAsher Gomez 7d23ed5984 fix: conditionally rendered element under fragment in island does not render (#1172)
This might be fixing #502, but I am not sure. All tests pass. I've added
additional test cases for comments from #502

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-05-23 12:24:05 +10:00
Yoshiya Hinosawa 8daa4849cf fix: revert "chore: bump dependencies and license year (#986)" (#1047) 2023-02-25 18:11:16 +09:00
Lino Le Van ed66986500 chore: bump dependencies and license year (#986) 2023-02-24 15:06:18 +09:00
Marvin HagemeisterandLuca Casonato 7e0278bbb3 feat: add support for preact devtools in dev mode (#639)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-08-23 13:29:12 +00:00
Luca Casonato fd4e2bbe17 feat: add initial plugin support (#512)
This commit adds initial support for fresh "plugins". These are bundles
of functionality that can be added to a fresh plugin through a simple
addition in the `main.ts` file.

Right now plugins are only able to hook into the render steps. This
means that they can inject styling and scripts. They can not yet hook
into routing.

Things that I think should be possible now:
- styling integrations for twind, unocss, and probably a few other tools

Things that are not possible yet:
- google analytics middleware
- database connectors
- CMS connectors

The routing additions to plugins can be added in a follow-up though.
2022-08-09 21:27:58 +02:00
Luca Casonato da340daeb2 BREAKING: move a bunch of types into server/ (#263)
Moved some server only types like `RouteConfig` into server/. They were
previously in runtime/.
2022-06-21 15:21:07 +02:00
Luca Casonato cbbf616a74 chore: version preact explicitly in import map (#258)
This allows users to control the `preact` version independently of fresh
itself.
2022-06-20 12:37:24 +02:00
Sylvain CauandLuca Casonato afafb7c938 fix: reviving multiple islands on one page (#197)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-06-07 15:02:48 +02:00
Luca Casonato 80598d07fd feat: use import maps instead of deps files (#209)
This commit updates fresh to use import maps instead of deps files in generated projects.
2022-05-23 19:35:15 +02:00
Luca Casonato f9f0125282 chore: rename PageConfig to RouteConfig (#202) 2022-05-23 15:52:29 +02:00
Sylvain Cau e8b1e229b3 feat: automatically apply asset caching to img src and srcset (#184) 2022-05-19 19:19:59 +02:00
Luca Casonato cf438a7879 refactor: asset caching via query param (#192)
This updates the asset caching to use a cache busting query string,
rather than a totally separate path. This makes it safer to apply
caching automatically to things like `<img>` tags, as the path does not
change anymore.
2022-05-16 17:39:22 +00:00
Sylvain Cau 6cbcc27646 feat: add support for static asset caching (#133) 2022-03-16 16:49:47 +01:00
Tyler Brostrom 837d2a7f5e chore: remove unused runtimeJS option (#120) 2022-03-07 00:14:32 +01:00
Luca Casonato 72115506b1 refactor: remove marker comments on hydration (#110) 2022-03-06 03:44:47 +01:00
Luca Casonato 4970663721 refactor: improved reviving of islands (#100) 2022-03-05 01:20:54 +01:00
Luca Casonato 8daa280862 feat: a new "island" based architechture (#97) 2022-03-04 19:49:27 +01:00
Leo KettmeirandLuca Casonato 04a32f3498 feat: _app (#87)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-02-18 19:30:24 +01:00
Leo Kettmeir 2ec980ca45 fix: PageProps.params never contains arrays, only strings (#91) 2022-02-15 13:24:18 +01:00
Leo Kettmeir d334b53320 feat: support custom error pages (#86) 2022-02-15 01:17:47 +01:00
Leo Kettmeir 64fbcabf67 chore: add a default type for render data (#90) 2022-02-14 16:30:54 +01:00
Leo KettmeirandLuca Casonato 788a85c431 feat: allow passing additional args to HandlerContext.render (#82)
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2022-02-11 01:25:47 +01:00