Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions skills/nano-kit-store/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1802,6 +1802,7 @@ Learn how to inspect the stores of a running app with @nano_kit/devtools.
- **Named for you**. Every signal gets a readable name, the place it was created and its owner, the store factory, the component or the file, straight from the call stack.
- **Transactions, not events**. The log groups what happened by flush, with the time of every run and the slowest one called out.
- **Live values**. Pick any node to see its value as a tree, what it reads, what reads it, and its last lines in the log.
- **Built with the kit**. The panel is itself an app on `@nano_kit/store`, with its views written in [Nanoviews](https://nanoviews.js.org), a Direct DOM library built on the same core.

## Installation

Expand Down
6 changes: 3 additions & 3 deletions website/astro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ export default defineConfig({
isProduction && {
tag: 'script',
attrs: {
'src': 'https://cloud.umami.is/script.js',
src: 'https://cloud.umami.is/script.js',
'data-website-id': '6b792c30-fae6-48d2-95fa-c1d39706f328',
'defer': true,
defer: true,
// Required to pass the COEP require-corp check
'crossorigin': 'anonymous'
crossorigin: 'anonymous'
}
},
{
Expand Down
36 changes: 27 additions & 9 deletions website/src/content/docs/examples/cvapp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,35 @@ sidebar:
order: 3
---

import { Tabs, TabItem } from '@astrojs/starlight/components'

This example shows a CV editor built with `@nano_kit/store`, `@nano_kit/query`, `@nano_kit/router`, and `@nano_kit/react`.

It is a compact reference for routed application screens, cached async data, derived state, and React components that subscribe to signals.

<iframe
src='https://stackblitz.com/github/TrigenSoftware/nano_kit/tree/main/examples/cvapp/react-nano_kit?embed=1&file=src/App.tsx&view=both&corp=1'
loading='lazy'
style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'
title='CV Generator built with React and Nano Kit'
allow='cross-origin-isolated; accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
/>
<Tabs syncKey='example-view'>
<TabItem label='React' icon='seti:react'>
<iframe
src='https://stackblitz.com/github/TrigenSoftware/nano_kit/tree/main/examples/cvapp/react-nano_kit?embed=1&file=src/App.tsx&view=both&corp=1'
loading='lazy'
style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'
title='CV Generator built with React and Nano Kit'
allow='cross-origin-isolated; accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
/>

[View source on GitHub](https://github.com/TrigenSoftware/nano_kit/tree/main/examples/cvapp/react-nano_kit)
</TabItem>
<TabItem label='Nanoviews' icon='moon'>
<iframe
src='https://stackblitz.com/github/TrigenSoftware/nanoviews/tree/main/examples/cvapp/nano_kit?embed=1&file=src/App.ts&view=both&corp=1'
loading='lazy'
style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'
title='CV Generator built with Nanoviews and Nano Kit'
allow='cross-origin-isolated; accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
/>

[View source on GitHub](https://github.com/TrigenSoftware/nano_kit/tree/main/examples/cvapp/react-nano_kit)
[View source on GitHub](https://github.com/TrigenSoftware/nanoviews/tree/main/examples/cvapp/nano_kit)
</TabItem>
</Tabs>
12 changes: 12 additions & 0 deletions website/src/content/docs/examples/event-board.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,16 @@ The Nano Kit tutorial uses this app as its running project.

[View source on GitHub](https://github.com/TrigenSoftware/nano_kit/tree/main/examples/event-board/svelte-nano_kit-intl-ssr)
</TabItem>
<TabItem label='Nanoviews' icon='moon'>
<iframe
src='https://stackblitz.com/github/TrigenSoftware/nanoviews/tree/main/examples/event-board/nano_kit-di-intl?embed=1&file=src%2Fmain.ts&view=both&corp=1'
loading='lazy'
style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'
title='Event Board built with Nanoviews and Nano Kit'
allow='cross-origin-isolated; accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
/>

[View source on GitHub](https://github.com/TrigenSoftware/nanoviews/tree/main/examples/event-board/nano_kit-di-intl)
</TabItem>
</Tabs>
14 changes: 13 additions & 1 deletion website/src/content/docs/examples/rick-and-morty.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Aside, Tabs, TabItem } from '@astrojs/starlight/components'

This example shows a larger encyclopedia app built around routing, data loading, and server-side rendering.

Compare the tabs to see the same application model running with React SSR, Svelte SSR, SvelteKit, Next.js App Router, and Next.js Pages Router.
Compare the tabs to see the same application model running with React SSR, Svelte SSR, SvelteKit, Next.js App Router, Next.js Pages Router, and [Nanoviews](https://nanoviews.js.org).

<Tabs syncKey='example-view'>
<TabItem label='React SSR' icon='seti:react'>
Expand Down Expand Up @@ -76,4 +76,16 @@ Compare the tabs to see the same application model running with React SSR, Svelt

[View source on GitHub](https://github.com/TrigenSoftware/nano_kit/tree/main/examples/rick-and-morty/next-pages-nano_kit-ssr)
</TabItem>
<TabItem label='Nanoviews' icon='moon'>
<iframe
src='https://stackblitz.com/github/TrigenSoftware/nanoviews/tree/main/examples/rick-and-morty/nano_kit?embed=1&file=src/App.ts&view=both&corp=1'
loading='lazy'
style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'
title='Rick and Morty Encyclopedia built with Nanoviews and Nano Kit'
allow='cross-origin-isolated; accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
/>

[View source on GitHub](https://github.com/TrigenSoftware/nanoviews/tree/main/examples/rick-and-morty/nano_kit)
</TabItem>
</Tabs>
12 changes: 12 additions & 0 deletions website/src/content/docs/examples/weather.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,16 @@ Use the **Basic** version for the shortest path through the data flow. Use the *

[View source on GitHub](https://github.com/TrigenSoftware/nano_kit/tree/main/examples/weather/react-nano_kit-di)
</TabItem>
<TabItem label='Nanoviews' icon='moon'>
<iframe
src='https://stackblitz.com/github/TrigenSoftware/nanoviews/tree/main/examples/weather/nano_kit?embed=1&file=src/App.ts&view=both&corp=1'
loading='lazy'
style='width: 100%; height: 500px; border: 0; border-radius: 4px; overflow: hidden;'
title='Weather App built with Nanoviews and Nano Kit'
allow='cross-origin-isolated; accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking'
sandbox='allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts'
/>

[View source on GitHub](https://github.com/TrigenSoftware/nanoviews/tree/main/examples/weather/nano_kit)
</TabItem>
</Tabs>
1 change: 1 addition & 0 deletions website/src/content/docs/store/devtools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import logDark from '../../../assets/devtools-log_dark.png'
- **Named for you**. Every signal gets a readable name, the place it was created and its owner, the store factory, the component or the file, straight from the call stack.
- **Transactions, not events**. The log groups what happened by flush, with the time of every run and the slowest one called out.
- **Live values**. Pick any node to see its value as a tree, what it reads, what reads it, and its last lines in the log.
- **Built with the kit**. The panel is itself an app on `@nano_kit/store`, with its views written in [Nanoviews](https://nanoviews.js.org), a Direct DOM library built on the same core.

<Image src={signalsLight} alt='The Signals tab: the signals of a weather app grouped by the stores they were created in, and the inspector of a selected computed' class='dark:sl-hidden' />
<Image src={signalsDark} alt='The Signals tab: the signals of a weather app grouped by the stores they were created in, and the inspector of a selected computed' class='light:sl-hidden' />
Expand Down
Loading