Wrapper class for MySQLi prepared statements to make your code concise.
Get all Facebook albums and photos https://websitebeaver.com/facebook-api-javascript-sdk-get-all-albums-and-photos
Cordova wrapper class to help standardize getting photos, videos and audio from your library or by recording and uploading multiple files at once.
There's times when the same interface
you're using for a component's props, is used in multiple other places in the application.
I hate that you can't use interfaces
with Svelte props, since you have you declare props
one by one. Example:
export let count = 0
export let name = ''
It would be nice if you could pass in interfaces
, like the following:
interface Props {
count: number
name: string
}
Obviously a contrived example, as the type can be inferred, but please ignore that for this sake.
Something like how Vue 3 reactivity transform (which incidentally won't be supported natively to destructure, despite being an experimental feature) did it:
interface Props {
count: number
name: string
}
const { count: 0, name: '' } = defineProps<Props>()
I'm not aware of any alternatives that currently exist to solve this issue. It's one of the rare things I feel like Svelte is lacking, which is an otherwise delightful library to use.
would make my life easier
Add CodeSandbox task to install Vue in demo folder
The following code shown consists of the pertinent parts. Other parts of the code were omitted for brevity.
Code
<script lang="ts">
const customComponents = [
{
component: Counter,
name: 'Counter',
image: 'https://cdn-icons-png.flaticon.com/512/6134/6134688.png',
inputs: [
{
name: 'count',
type: 'number',
defaultValue: 0
},
],
},
]
</script>
<RenderContent
model="page"
content={data.content}
apiKey={BUILDER_PUBLIC_API_KEY}
customComponents={customComponents}
/>
The full message is:
Type '{ component: typeof Counter__SvelteComponent_; name: string; image: string; inputs: { name: string; type: string; defaultValue: number; }[]; }[]' is not assignable to type 'RegisteredComponent[]'. Type '{ component: typeof Counter; name: string; image: string; inputs: { name: string; type: string; defaultValue: number; }[]; }' is not assignable to type 'RegisteredComponent'. Property 'builtIn' is missing in type '{ component: typeof Counter; name: string; image: string; inputs: { name: string; type: string; defaultValue: number; }[]; }' but required in type 'ComponentInfo'.
Add Vue dependency to demo subfolder
Make Vue a peerDependency
Fix typo in CHANGELOG in header hash
Add details new version in CHANGELOG
Thank you for this fix!
fix: export default style
Change CSS file alias name and show usage in README
Merge pull request #5 from skhrvg/master
fix: export default style
Vite libraries cannot inject css files, so they must be imported manually (for example, in main.ts). To make this possible, please add CSS export to package.json.
Also, it would be good to point out the need for manual import in README.md.
// main.ts
...
import '@websitebeaver/vue-magnifier/style'
...