Skip to content

Commit

Permalink
chore: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Oct 30, 2024
1 parent 3920596 commit 455d966
Show file tree
Hide file tree
Showing 22 changed files with 1,487 additions and 2,077 deletions.
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# auto-install-peers=false
enable-pre-post-scripts=true
link-workspace-packages=deep
provenance=true
strict-peer-dependencies=false
2 changes: 1 addition & 1 deletion examples/deposit-flow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@types/events": "^3.0.3",
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-page-router/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Home() {
appearance: 'light',
theme: {
container: {
boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
border: '1px solid rgb(234, 234, 234)',
borderRadius: '16px',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function DynamicImportWidget() {
appearance: 'light',
theme: {
container: {
boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
border: '1px solid rgb(234, 234, 234)',
borderRadius: '16px',
},
},
Expand Down
8 changes: 3 additions & 5 deletions examples/nextjs-page-router/components/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ interface WidgetProps {

export function Widget({ config, fallback }: WidgetProps) {
return (
<main>
<ClientOnly fallback={fallback}>
<LiFiWidget config={config} integrator="nextjs-example" />
</ClientOnly>
</main>
<ClientOnly fallback={fallback}>
<LiFiWidget config={config} integrator="nextjs-example" />
</ClientOnly>
)
}
6 changes: 3 additions & 3 deletions examples/nextjs-page-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"start": "next start"
},
"dependencies": {
"@lifi/widget": "workspace:^",
"next": "14.2.15",
"@lifi/widget": "^3.10.0",
"next": "^14.2.15",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"typescript": "^5.5.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-page-router/pages/pages-example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function PagesExample() {
appearance: 'light',
theme: {
container: {
boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
border: '1px solid rgb(234, 234, 234)',
borderRadius: '16px',
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/components/PagesWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function PagesWidget() {
appearance: 'light',
theme: {
container: {
boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
border: '1px solid rgb(234, 234, 234)',
borderRadius: '16px',
},
},
Expand Down
10 changes: 4 additions & 6 deletions examples/nextjs/components/Widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ export function Widget() {
appearance: 'light',
theme: {
container: {
boxShadow: '0px 8px 32px rgba(0, 0, 0, 0.08)',
border: '1px solid rgb(234, 234, 234)',
borderRadius: '16px',
},
},
} as Partial<WidgetConfig>

return (
<main>
<ClientOnly fallback={<WidgetSkeleton config={config} />}>
<LiFiWidget config={config} integrator="nextjs-example" />
</ClientOnly>
</main>
<ClientOnly fallback={<WidgetSkeleton config={config} />}>
<LiFiWidget config={config} integrator="nextjs-example" />
</ClientOnly>
)
}
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
"dependencies": {
"@lifi/sdk": "^3.4.0",
"@lifi/widget": "workspace:^",
"@lifi/widget": "^3.10.0",
"next": "^14.2.16",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"typescript": "^5.5.4"
Expand Down
8 changes: 4 additions & 4 deletions examples/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"postinstall": "nuxt prepare"
},
"dependencies": {
"@lifi/widget": "workspace:^",
"nuxt": "^3.12.4",
"veaury": "^2.4.2",
"@lifi/widget": "^3.10.0",
"nuxt": "3.13.1",
"veaury": "^2.5.1",
"vite-plugin-node-polyfills": "^0.22.0",
"vue": "^3.5.12",
"vue-router": "^4.4.0"
"vue-router": "^4.4.5"
}
}
5 changes: 0 additions & 5 deletions examples/remix/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ import {
ScrollRestoration,
} from '@remix-run/react'

// Note: at the time of writing Remix's suggestion for dealing with global polyfills
// didn't seem to work. Have put this in place as a workaround.
import { Buffer as BufferPolyfill } from 'node:buffer'
globalThis.Buffer = BufferPolyfill

export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : []),
]
Expand Down
2 changes: 1 addition & 1 deletion examples/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"typecheck": "tsc"
},
"dependencies": {
"@lifi/widget": "workspace:^",
"@lifi/widget": "^3.10.0",
"@remix-run/css-bundle": "^2.13.1",
"@remix-run/node": "^2.13.1",
"@remix-run/react": "^2.13.1",
Expand Down
6 changes: 3 additions & 3 deletions examples/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"check": "svelte-check --tsconfig ./tsconfig.json"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.1",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@tsconfig/svelte": "^5.0.4",
"@types/events": "^3.0.3",
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"svelte": "^4.2.18",
"svelte": "^5.1.4",
"svelte-check": "^4.0.5",
"svelte-preprocess": "^6.0.2",
"tslib": "^2.8.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/src/lib/ReactAdapter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ onDestroy(() => {
})
</script>

<div bind:this={container} class={$$props.class} />
<div bind:this={container} class={$$props.class}></div>
3 changes: 2 additions & 1 deletion examples/svelte/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mount } from 'svelte'
import App from './App.svelte'

const app = new App({
const app = mount(App, {
target: document.getElementById('app') as HTMLElement,
})

Expand Down
2 changes: 1 addition & 1 deletion examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@types/events": "^3.0.3",
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
Expand Down
4 changes: 2 additions & 2 deletions examples/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vite preview"
},
"dependencies": {
"@lifi/widget": "workspace:^",
"veaury": "^2.4.2",
"@lifi/widget": "^3.10.0",
"veaury": "^2.5.1",
"vue": "^3.5.12"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/events": "^3.0.3",
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"cpy-cli": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-playground-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"typescript": "^5.6.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/widget-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
},
"devDependencies": {
"@types/lodash.isequal": "^4.5.8",
"@types/node": "^22.8.1",
"@types/node": "^22.8.4",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react-swc": "^3.7.1",
Expand Down
Loading

0 comments on commit 455d966

Please sign in to comment.