Skip to content

Commit

Permalink
Add support for Svelte 5
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Nov 6, 2024
1 parent dfce1dc commit ef6f0b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"peerDependencies": {
"@mux/mux-player": "*",
"svelte": "^3.59.2 || ^4.0.0 || ^5.0.0"
"svelte": "^4.0.0 || ^5.0.0"
},
"peerDependenciesMeta": {
"@mux/mux-player": {
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/StructuredText/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Setup](#setup)
- [Basic usage](#basic-usage)
- [Customization](#customization)
- [Custom components for blocks](#custom-components-for-blocks)
Expand Down
7 changes: 5 additions & 2 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Node } from 'datocms-structured-text-utils';
import type { SvelteComponent } from 'svelte';

export { default as NakedImage } from './components/NakedImage/NakedImage.svelte';
export type { ResponsiveImageType } from './components/NakedImage/utils';
Expand All @@ -13,6 +12,10 @@ export * from './stores/querySubscription';

export type PredicateComponentTuple = [
(n: Node) => boolean,
// should be
// typeof SvelteComponent<any> | Component<any, any, any>,
// but Svelte 4 does not have `Component`

// eslint-disable-next-line @typescript-eslint/no-explicit-any
new (...any: any) => SvelteComponent
any,
];

0 comments on commit ef6f0b3

Please sign in to comment.