├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── .npmignore
├── README.md
├── assets
├── stoxy-demo.gif
├── stoxy.png
├── stoxy_icon.png
├── stoxy_icon_alt.png
└── stoxy_transparent.png
├── docs
├── .eleventyignore
├── .gitignore
├── _site-dev
│ ├── _assets
│ │ ├── _static
│ │ │ └── icons
│ │ │ │ ├── android-chrome-192x192.png
│ │ │ │ ├── android-chrome-512x512.png
│ │ │ │ ├── apple-touch-icon.png
│ │ │ │ ├── browserconfig.xml
│ │ │ │ ├── favicon-16x16.png
│ │ │ │ ├── favicon-32x32.png
│ │ │ │ ├── mstile-150x150.png
│ │ │ │ └── safari-pinned-tab.svg
│ │ ├── layout.css
│ │ ├── logo.png
│ │ ├── logo.svg
│ │ ├── stoxy_icon.png
│ │ ├── stoxy_icon_alt.png
│ │ └── variables.css
│ ├── _data
│ │ ├── footer.json
│ │ └── rocketLaunch.json
│ ├── _merged_assets
│ │ ├── 404
│ │ │ ├── 404.svg
│ │ │ ├── astronaut.svg
│ │ │ ├── earth.svg
│ │ │ ├── moon.svg
│ │ │ └── rocket.svg
│ │ ├── _inline-scripts
│ │ │ └── serviceWorkerUpdate.js
│ │ ├── _static
│ │ │ ├── 404
│ │ │ │ ├── bg_purple.png
│ │ │ │ └── overlay_stars.svg
│ │ │ ├── icons
│ │ │ │ ├── android-chrome-192x192.png
│ │ │ │ ├── android-chrome-512x512.png
│ │ │ │ ├── apple-touch-icon.png
│ │ │ │ ├── browserconfig.xml
│ │ │ │ ├── favicon-16x16.png
│ │ │ │ ├── favicon-32x32.png
│ │ │ │ ├── icon-128x128.png
│ │ │ │ ├── icon-512x512.png
│ │ │ │ ├── maskable-icon-128x128.png
│ │ │ │ ├── maskable-icon.png
│ │ │ │ ├── mstile-150x150.png
│ │ │ │ └── safari-pinned-tab.svg
│ │ │ ├── noscript.css
│ │ │ └── rocket-search-index.json
│ │ ├── brand-logos
│ │ │ ├── discord.svg
│ │ │ ├── github.svg
│ │ │ ├── gitlab.svg
│ │ │ ├── telegram.svg
│ │ │ └── twitter.svg
│ │ ├── burger-menu.svg
│ │ ├── home-background.svg
│ │ ├── layout.css
│ │ ├── logo.png
│ │ ├── logo.svg
│ │ ├── markdown.css
│ │ ├── octicon.svg
│ │ ├── rocket-blog.css
│ │ ├── scripts
│ │ │ └── init-navigation.js
│ │ ├── social-media-image.jpg
│ │ ├── stoxy_icon.png
│ │ ├── stoxy_icon_alt.png
│ │ ├── style.css
│ │ ├── variables.css
│ │ └── webmanifest.json
│ ├── _merged_data
│ │ ├── footer.json
│ │ └── rocketLaunch.json
│ ├── docs
│ │ ├── components
│ │ │ ├── index.html
│ │ │ ├── stoxy-form
│ │ │ │ └── index.html
│ │ │ ├── stoxy-object
│ │ │ │ └── index.html
│ │ │ ├── stoxy-repeat
│ │ │ │ └── index.html
│ │ │ └── stoxy-string
│ │ │ │ └── index.html
│ │ ├── index.html
│ │ └── methods
│ │ │ ├── add
│ │ │ └── index.html
│ │ │ ├── clear
│ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ ├── persist-key
│ │ │ └── index.html
│ │ │ ├── read
│ │ │ └── index.html
│ │ │ ├── remove
│ │ │ └── index.html
│ │ │ ├── sub
│ │ │ └── index.html
│ │ │ ├── update
│ │ │ └── index.html
│ │ │ └── write
│ │ │ └── index.html
│ ├── guides
│ │ ├── examples
│ │ │ ├── counter
│ │ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ └── todo
│ │ │ │ └── index.html
│ │ ├── getting-started
│ │ │ ├── core-functionality
│ │ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ └── installation
│ │ │ │ └── index.html
│ │ ├── index.html
│ │ └── recipes
│ │ │ ├── index.html
│ │ │ ├── persisting-data
│ │ │ └── index.html
│ │ │ ├── reading-data
│ │ │ └── index.html
│ │ │ ├── removing-data
│ │ │ └── index.html
│ │ │ ├── subscribing-to-updates
│ │ │ └── index.html
│ │ │ ├── updating-data
│ │ │ └── index.html
│ │ │ └── writing-data
│ │ │ └── index.html
│ ├── index.html
│ └── sitemap.xml
├── _site
│ ├── 040559f3.png
│ ├── 0477ceda.png
│ ├── 0d2fe2f7.svg
│ ├── 0fe6ea42.svg
│ ├── 1927b521.png
│ ├── 1ae651f9.js
│ ├── 1c0b28b1.png
│ ├── 1cbaf32c.png
│ ├── 1e574a75.svg
│ ├── 1e9e0c25.png
│ ├── 1f9f77a0.js
│ ├── 31c92193.png
│ ├── 378e9adb.js
│ ├── 378e9adb2.js
│ ├── 378e9adb3.js
│ ├── 39b5bedf.css
│ ├── 3ae7b943.png
│ ├── 3d9b4148.png
│ ├── 404.html
│ ├── 4b25b9fa.png
│ ├── 50d23703.js
│ ├── 50d2370310.js
│ ├── 50d2370311.js
│ ├── 50d2370312.js
│ ├── 50d2370313.js
│ ├── 50d2370314.js
│ ├── 50d2370315.js
│ ├── 50d2370316.js
│ ├── 50d2370317.js
│ ├── 50d2370318.js
│ ├── 50d2370319.js
│ ├── 50d237032.js
│ ├── 50d2370320.js
│ ├── 50d2370321.js
│ ├── 50d2370322.js
│ ├── 50d2370323.js
│ ├── 50d2370324.js
│ ├── 50d2370325.js
│ ├── 50d2370326.js
│ ├── 50d2370327.js
│ ├── 50d2370328.js
│ ├── 50d2370329.js
│ ├── 50d237033.js
│ ├── 50d2370330.js
│ ├── 50d2370331.js
│ ├── 50d2370332.js
│ ├── 50d2370333.js
│ ├── 50d2370334.js
│ ├── 50d2370335.js
│ ├── 50d2370336.js
│ ├── 50d2370337.js
│ ├── 50d2370338.js
│ ├── 50d2370339.js
│ ├── 50d237034.js
│ ├── 50d237035.js
│ ├── 50d237036.js
│ ├── 50d237037.js
│ ├── 50d237038.js
│ ├── 50d237039.js
│ ├── 5a52bfde.png
│ ├── 5a767252.png
│ ├── 636405e5.svg
│ ├── 6d016687.png
│ ├── 72033f3a.png
│ ├── 7c774002.js
│ ├── 7f28a89b.png
│ ├── 7fd38230.png
│ ├── 8084ba1d.png
│ ├── 87893830.js
│ ├── 8db0b317.png
│ ├── 8e4cba22.js
│ ├── 8ec74bec.css
│ ├── 8f9b4959.png
│ ├── 964d560d.png
│ ├── 99517503.png
│ ├── 9b45579a.png
│ ├── 9e097e6a.png
│ ├── _merged_assets
│ │ └── _static
│ │ │ ├── 404
│ │ │ ├── bg_purple.png
│ │ │ └── overlay_stars.svg
│ │ │ ├── icons
│ │ │ ├── android-chrome-192x192.png
│ │ │ ├── android-chrome-512x512.png
│ │ │ ├── apple-touch-icon.png
│ │ │ ├── favicon-16x16.png
│ │ │ ├── favicon-32x32.png
│ │ │ ├── icon-128x128.png
│ │ │ ├── icon-512x512.png
│ │ │ ├── maskable-icon-128x128.png
│ │ │ ├── maskable-icon.png
│ │ │ ├── mstile-150x150.png
│ │ │ └── safari-pinned-tab.svg
│ │ │ ├── noscript.css
│ │ │ └── rocket-search-index.json
│ ├── a0513237.css
│ ├── a3e0bbf4.png
│ ├── a6d6f7c1.js
│ ├── a6d6f7c110.js
│ ├── a6d6f7c111.js
│ ├── a6d6f7c112.js
│ ├── a6d6f7c113.js
│ ├── a6d6f7c114.js
│ ├── a6d6f7c115.js
│ ├── a6d6f7c116.js
│ ├── a6d6f7c117.js
│ ├── a6d6f7c118.js
│ ├── a6d6f7c119.js
│ ├── a6d6f7c12.js
│ ├── a6d6f7c120.js
│ ├── a6d6f7c121.js
│ ├── a6d6f7c122.js
│ ├── a6d6f7c123.js
│ ├── a6d6f7c124.js
│ ├── a6d6f7c125.js
│ ├── a6d6f7c126.js
│ ├── a6d6f7c127.js
│ ├── a6d6f7c128.js
│ ├── a6d6f7c129.js
│ ├── a6d6f7c13.js
│ ├── a6d6f7c130.js
│ ├── a6d6f7c131.js
│ ├── a6d6f7c132.js
│ ├── a6d6f7c133.js
│ ├── a6d6f7c134.js
│ ├── a6d6f7c135.js
│ ├── a6d6f7c136.js
│ ├── a6d6f7c137.js
│ ├── a6d6f7c138.js
│ ├── a6d6f7c139.js
│ ├── a6d6f7c14.js
│ ├── a6d6f7c15.js
│ ├── a6d6f7c16.js
│ ├── a6d6f7c17.js
│ ├── a6d6f7c18.js
│ ├── a6d6f7c19.js
│ ├── a7ac5b27.png
│ ├── a9f3a3a3.png
│ ├── af3902fd.png
│ ├── assets
│ │ ├── apple-touch-icon.png
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── safari-pinned-tab.svg
│ │ └── webmanifest.json
│ ├── b8c01bc2.css
│ ├── c4e76b46.png
│ ├── ca2b0b57.js
│ ├── cf441905.png
│ ├── d3699997.css
│ ├── d5f3c88e.png
│ ├── dbab1826.png
│ ├── dd041e77.png
│ ├── docs
│ │ ├── components
│ │ │ ├── index.html
│ │ │ ├── stoxy-form
│ │ │ │ └── index.html
│ │ │ ├── stoxy-object
│ │ │ │ └── index.html
│ │ │ ├── stoxy-repeat
│ │ │ │ └── index.html
│ │ │ └── stoxy-string
│ │ │ │ └── index.html
│ │ ├── hooks
│ │ │ ├── index.html
│ │ │ └── using-stoxy-with-hooks
│ │ │ │ └── index.html
│ │ ├── index.html
│ │ ├── methods
│ │ │ ├── add
│ │ │ │ └── index.html
│ │ │ ├── clear
│ │ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ ├── persist-key
│ │ │ │ └── index.html
│ │ │ ├── read
│ │ │ │ └── index.html
│ │ │ ├── remove
│ │ │ │ └── index.html
│ │ │ ├── sub
│ │ │ │ └── index.html
│ │ │ ├── update
│ │ │ │ └── index.html
│ │ │ ├── where
│ │ │ │ └── index.html
│ │ │ └── write
│ │ │ │ └── index.html
│ │ └── mixins
│ │ │ ├── element-mixin
│ │ │ └── index.html
│ │ │ └── index.html
│ ├── e3ddea26.png
│ ├── eeb55bd7.png
│ ├── f39f33b7.png
│ ├── f56c2bb7.png
│ ├── f6087910.png
│ ├── fb6ea901.png
│ ├── fc65943c.png
│ ├── guides
│ │ ├── examples
│ │ │ ├── counter
│ │ │ │ └── index.html
│ │ │ ├── hooks
│ │ │ │ └── index.html
│ │ │ ├── html-element-mixin
│ │ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ ├── lit-element-mixin
│ │ │ │ └── index.html
│ │ │ ├── todo
│ │ │ │ └── index.html
│ │ │ └── user-list
│ │ │ │ └── index.html
│ │ ├── getting-started
│ │ │ ├── core-functionality
│ │ │ │ └── index.html
│ │ │ ├── index.html
│ │ │ └── installation
│ │ │ │ └── index.html
│ │ ├── index.html
│ │ └── recipes
│ │ │ ├── index.html
│ │ │ ├── persisting-data
│ │ │ └── index.html
│ │ │ ├── reading-data
│ │ │ └── index.html
│ │ │ ├── removing-data
│ │ │ └── index.html
│ │ │ ├── subscribing-to-updates
│ │ │ └── index.html
│ │ │ ├── updating-data
│ │ │ └── index.html
│ │ │ └── writing-data
│ │ │ └── index.html
│ ├── index.html
│ ├── service-worker.js
│ ├── service-worker.js.map
│ ├── sitemap.xml
│ ├── workbox-6881a531.js
│ └── workbox-6881a531.js.map
├── docs
│ ├── 404.md
│ ├── _assets
│ │ ├── 11ty-img
│ │ │ └── ffa575e1-1200.png
│ │ ├── _static
│ │ │ └── icons
│ │ │ │ ├── android-chrome-192x192.png
│ │ │ │ ├── android-chrome-512x512.png
│ │ │ │ ├── apple-touch-icon.png
│ │ │ │ ├── browserconfig.xml
│ │ │ │ ├── favicon-16x16.png
│ │ │ │ ├── favicon-32x32.png
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── mstile-150x150.png
│ │ │ │ ├── safari-pinned-tab.svg
│ │ │ │ └── site.webmanifest
│ │ ├── layout.css
│ │ ├── logo.png
│ │ ├── logo.svg
│ │ ├── stoxy_icon.png
│ │ ├── stoxy_icon_alt.png
│ │ └── variables.css
│ ├── _data
│ │ ├── eleventyComputed.cjs
│ │ ├── footer.json
│ │ ├── rocketConfig.cjs
│ │ ├── rocketLaunch.json
│ │ ├── site.cjs
│ │ └── siteUrl.cjs
│ ├── _includes
│ │ ├── _joiningBlocks
│ │ │ ├── _layoutHome
│ │ │ │ └── content
│ │ │ │ │ └── 10-hero.njk
│ │ │ ├── _layoutSidebar
│ │ │ │ └── content
│ │ │ │ │ └── 100-footer.njk
│ │ │ └── header
│ │ │ │ └── 20-logo.njk
│ │ └── partials
│ │ │ ├── _layoutHome
│ │ │ ├── _layoutHome
│ │ │ │ ├── content.njk
│ │ │ │ └── sidebar.njk
│ │ │ ├── content.njk
│ │ │ └── sidebar.njk
│ │ │ ├── _layoutIndex
│ │ │ └── content.njk
│ │ │ ├── _layoutSidebar
│ │ │ ├── content.njk
│ │ │ └── sidebar.njk
│ │ │ ├── _shared
│ │ │ ├── blog-content-footer.njk
│ │ │ ├── darkSwitch.njk
│ │ │ └── logoLink.njk
│ │ │ ├── bottom.njk
│ │ │ ├── content.njk
│ │ │ ├── darkModeJs.njk
│ │ │ ├── footer.njk
│ │ │ ├── head.njk
│ │ │ ├── header.njk
│ │ │ └── mobile-sidebar-bottom.njk
│ ├── blog
│ │ └── index.md
│ ├── docs
│ │ ├── components
│ │ │ ├── index.md
│ │ │ ├── stoxy-form.md
│ │ │ ├── stoxy-object.md
│ │ │ ├── stoxy-repeat.md
│ │ │ └── stoxy-string.md
│ │ ├── hooks
│ │ │ ├── index.md
│ │ │ └── using-stoxy-with-hooks.md
│ │ ├── index.md
│ │ ├── methods
│ │ │ ├── add.md
│ │ │ ├── clear.md
│ │ │ ├── index.md
│ │ │ ├── persist-key.md
│ │ │ ├── read.md
│ │ │ ├── remove.md
│ │ │ ├── sub.md
│ │ │ ├── update.md
│ │ │ ├── where.md
│ │ │ └── write.md
│ │ └── mixins
│ │ │ ├── element-mixin.md
│ │ │ └── index.md
│ ├── guides
│ │ ├── examples
│ │ │ ├── counter.md
│ │ │ ├── hooks.md
│ │ │ ├── html-element-mixin.md
│ │ │ ├── index.md
│ │ │ ├── lit-element-mixin.md
│ │ │ ├── todo.md
│ │ │ └── user-list.md
│ │ ├── getting-started
│ │ │ ├── core-functionality.md
│ │ │ ├── index.md
│ │ │ └── installation.md
│ │ ├── index.md
│ │ └── recipes
│ │ │ ├── index.md
│ │ │ ├── persisting-data.md
│ │ │ ├── reading-data.md
│ │ │ ├── removing-data.md
│ │ │ ├── subscribing-to-updates.md
│ │ │ ├── updating-data.md
│ │ │ └── writing-data.md
│ ├── index.md
│ └── sitemap.njk
├── package-lock.json
├── package.json
└── rocket.config.mjs
├── examples
├── reference-values
│ ├── index.html
│ ├── index.js
│ ├── package-lock.json
│ └── package.json
├── todo-app
│ ├── .editorconfig
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── custom-elements.json
│ ├── index.html
│ ├── jsconfig.json
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── TodoAdder.js
│ │ ├── TodoApp.js
│ │ ├── TodoEntry.js
│ │ └── todo-app.js
│ └── web-dev-server.config.mjs
└── ts-test
│ ├── index.ts
│ ├── package-lock.json
│ ├── package.json
│ └── tsconfig.json
├── index.js
├── jsconfig.json
├── lib
├── core
│ ├── README.md
│ ├── index.d.ts
│ ├── package.json
│ ├── stoxy-events.js
│ ├── stoxy-storage.js
│ └── stoxy.js
├── element-base
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── stoxy-element.js
├── form
│ ├── README.md
│ ├── package.json
│ └── stoxy-form.js
├── object
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── stoxy-object.js
├── repeat
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── stoxy-repeat.js
├── string
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ └── stoxy-string.js
└── update-components.sh
├── package-lock.json
├── package.json
└── test
├── add.test.js
├── cache.test.js
├── clear.test.js
├── errors.test.js
├── general.test.js
├── indexeddb.test.js
├── queue.test.js
├── read.test.js
├── remove.test.js
├── sub.test.js
├── update.test.js
├── where.test.js
└── write.test.js
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Deploy Docs
2 | on: [push]
3 | jobs:
4 | deploy:
5 | concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
6 | runs-on: ubuntu-latest
7 | steps:
8 | - name: Checkout 🛎️
9 | uses: actions/checkout@v3
10 |
11 | - name: Deploy 🚀
12 | uses: JamesIves/github-pages-deploy-action@v4.2.5
13 | with:
14 | branch: gh-pages # The branch the action should deploy to.
15 | folder: docs/_site # The folder the action should deploy.
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | coverage
3 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | examples
2 | NOTES
3 | jsconfig.json
4 | assets
5 | lib
6 | docs
7 |
--------------------------------------------------------------------------------
/assets/stoxy-demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/assets/stoxy-demo.gif
--------------------------------------------------------------------------------
/assets/stoxy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/assets/stoxy.png
--------------------------------------------------------------------------------
/assets/stoxy_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/assets/stoxy_icon.png
--------------------------------------------------------------------------------
/assets/stoxy_icon_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/assets/stoxy_icon_alt.png
--------------------------------------------------------------------------------
/assets/stoxy_transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/assets/stoxy_transparent.png
--------------------------------------------------------------------------------
/docs/.eleventyignore:
--------------------------------------------------------------------------------
1 | node_modules/**
2 | /docs/_assets
3 | /docs/_includes
4 | /docs/_data
5 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | ## Rocket ignore files (need to be the full relative path to the folders)
3 | docs/_merged_data/
4 | docs/_merged_assets/
5 | docs/_merged_includes/
6 | _site-dev
7 |
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/_static/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/_static/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/_static/icons/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/_static/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/_static/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/_static/icons/mstile-150x150.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/_static/icons/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 | Created by potrace 1.11, written by Peter Selinger 2001-2013
9 |
10 |
12 |
14 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/logo.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/stoxy_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/stoxy_icon.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/stoxy_icon_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_assets/stoxy_icon_alt.png
--------------------------------------------------------------------------------
/docs/_site-dev/_assets/variables.css:
--------------------------------------------------------------------------------
1 | html {
2 | --primary-color: #232629;
3 | --primary-color-lighter: #474d53;
4 | --primary-color-darker: #353a3e;
5 | --primary-color-accent: #596168;
6 | --primary-text-color: #232629;
7 | --primary-lines-color: #ccc;
8 |
9 | /* Contrast colors */
10 | --contrast-color-light: #fff;
11 | --contrast-color-dark: #1d3557;
12 |
13 | /* background-colors */
14 | --page-background: white;
15 | --footer-background: #232629;
16 | --footer-text-color: #FFF;
17 |
18 | --text-color: #232629;
19 | }
20 |
21 | html.dark {
22 | --primary-color: #e63946;
23 | --primary-color-lighter: #e25761;
24 | --primary-color-darker: #a22831;
25 | --primary-color-accent: #cee5f6;
26 | --primary-text-color: #eee;
27 |
28 | /* Contrast colors */
29 | --contrast-color-light: #fff;
30 | --contrast-color-dark: #1d3557;
31 |
32 | /* background-colors */
33 | --page-background: #333;
34 | --footer-background: #4f4f4f;
35 |
36 | --text-color: white;
37 |
38 | --markdown-octicon-link: white;
39 | --markdown-syntax-background-color: #a0a0a0;
40 | --markdown-link-color: #fb7881;
41 | --markdown-blockquote-color: #c9e3ff;
42 | }
43 |
--------------------------------------------------------------------------------
/docs/_site-dev/_data/footer.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Discover",
4 | "children": [
5 | {
6 | "text": "Help and Feedback",
7 | "href": "https://github.com/stoxy-js/stoxy/issues"
8 | }
9 | ]
10 | },
11 | {
12 | "name": "Follow",
13 | "children": [
14 | {
15 | "text": "GitHub",
16 | "href": "https://github.com/stoxy-js/stoxy"
17 | },
18 | {
19 | "text": "Twitter",
20 | "href": "https://twitter.com/matsuuu_"
21 | }
22 | ]
23 | },
24 | {
25 | "name": "Support",
26 | "children": [
27 | {
28 | "text": "Contribute",
29 | "href": "https://github.com/stoxy-js/stoxy/issues"
30 | }
31 | ]
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/docs/_site-dev/_data/rocketLaunch.json:
--------------------------------------------------------------------------------
1 | {
2 | "homeLayout": "logo",
3 | "newsletter": false
4 | }
5 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/404/earth.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
21 |
22 |
23 |
24 |
25 | earth
26 |
27 |
28 |
29 |
30 |
31 |
32 |
35 |
38 |
41 |
44 |
45 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/404/rocket.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 | rocket_1
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_inline-scripts/serviceWorkerUpdate.js:
--------------------------------------------------------------------------------
1 | async function serviceWorkerUpdate() {
2 | if ('serviceWorker' in navigator) {
3 | const oldReg = await navigator.serviceWorker.getRegistration();
4 | let oldSwState;
5 | if (oldReg && oldReg.active) {
6 | oldSwState = oldReg.active.state;
7 | }
8 |
9 | let refreshing;
10 |
11 | navigator.serviceWorker.addEventListener('controllerchange', async () => {
12 | if (refreshing) {
13 | return;
14 | }
15 |
16 | const newReg = await navigator.serviceWorker.getRegistration();
17 | let newSwState;
18 | if (newReg && newReg.active) {
19 | newSwState = newReg.active.state;
20 | }
21 |
22 | if (oldSwState === 'activated' && newSwState === 'activating') {
23 | refreshing = true;
24 | window.location.reload();
25 | }
26 | });
27 | }
28 | }
29 |
30 | serviceWorkerUpdate();
31 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/404/bg_purple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/404/bg_purple.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/404/overlay_stars.svg:
--------------------------------------------------------------------------------
1 |
5 |
6 | overlay_stars_1
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/icon-128x128.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/icon-512x512.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/maskable-icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/maskable-icon-128x128.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/maskable-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/maskable-icon.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/_static/icons/mstile-150x150.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/icons/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 | Created by potrace 1.11, written by Peter Selinger 2001-2013
9 |
10 |
12 |
14 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/_static/noscript.css:
--------------------------------------------------------------------------------
1 | /* override to add noscript styles */
2 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/brand-logos/discord.svg:
--------------------------------------------------------------------------------
1 |
2 | Discord
3 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/brand-logos/github.svg:
--------------------------------------------------------------------------------
1 |
2 | GitHub
3 |
4 |
5 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/brand-logos/gitlab.svg:
--------------------------------------------------------------------------------
1 | GitLab
2 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/brand-logos/telegram.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/brand-logos/twitter.svg:
--------------------------------------------------------------------------------
1 | Twitter
2 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/burger-menu.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/logo.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/octicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/rocket-blog.css:
--------------------------------------------------------------------------------
1 | /** BLOG OVERVIEW **************************************************************************/
2 |
3 | body[layout='layout-blog-details'] rocket-navigation > ul > li.current::before {
4 | display: none;
5 | }
6 |
7 | body[layout='layout-blog-details'] #sidebar-nav li.anchor a:hover::before {
8 | display: none;
9 | }
10 |
11 | .articles {
12 | display: flex;
13 | justify-content: center;
14 | align-items: center;
15 | padding-top: 40px;
16 |
17 | /* css flexbox gap workaround https://coryrylan.com/blog/css-gap-space-with-flexbox */
18 | --gap: 60px;
19 | display: inline-flex;
20 | flex-wrap: wrap;
21 | margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap));
22 | width: calc(100% + var(--gap));
23 | }
24 |
25 | .articles article {
26 | flex: 0 1 360px;
27 | margin: var(--gap) 0 0 var(--gap);
28 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
29 | transition: 0.3s;
30 | }
31 |
32 | .articles article h2 {
33 | margin: 0;
34 | border: none;
35 | }
36 |
37 | .articles article .read {
38 | display: block;
39 | text-align: right;
40 | }
41 |
42 | .articles article .content {
43 | padding: 10px;
44 | }
45 |
46 | .articles article:hover {
47 | box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
48 | }
49 |
50 | @media screen and (min-width: 1024px) {
51 | body[layout='layout-blog-details'] #sidebar {
52 | display: block;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/scripts/init-navigation.js:
--------------------------------------------------------------------------------
1 | import '@rocket/navigation/rocket-navigation.js';
2 | import '@rocket/drawer/rocket-drawer.js';
3 | const drawer = document.querySelector('#sidebar');
4 |
5 | // Toggle button
6 | const triggers = document.querySelectorAll('[data-action="trigger-mobile-menu"]');
7 | for (const trigger of [...triggers]) {
8 | trigger.addEventListener('click', function () {
9 | drawer.opened = true;
10 | });
11 | }
12 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/social-media-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/social-media-image.jpg
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/stoxy_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/stoxy_icon.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/stoxy_icon_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site-dev/_merged_assets/stoxy_icon_alt.png
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/style.css:
--------------------------------------------------------------------------------
1 | /* feel free to override this file for your page - add a file docs/_assets/style.css */
2 |
3 | body[layout^='layout-home'] .markdown-body .call-to-action:nth-of-type(2) {
4 | --primary-color: #222;
5 | --primary-color-lighter: #333;
6 | --primary-color-darker: #000;
7 | }
8 |
9 | @media screen and (min-width: 1024px) {
10 | body[layout='layout-home-background'] .page-background {
11 | top: -210px;
12 | right: -463px;
13 | transform: rotate(45deg);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/variables.css:
--------------------------------------------------------------------------------
1 | html {
2 | --primary-color: #232629;
3 | --primary-color-lighter: #474d53;
4 | --primary-color-darker: #353a3e;
5 | --primary-color-accent: #596168;
6 | --primary-text-color: #232629;
7 | --primary-lines-color: #ccc;
8 |
9 | /* Contrast colors */
10 | --contrast-color-light: #fff;
11 | --contrast-color-dark: #1d3557;
12 |
13 | /* background-colors */
14 | --page-background: white;
15 | --footer-background: #232629;
16 | --footer-text-color: #FFF;
17 |
18 | --text-color: #232629;
19 | }
20 |
21 | html.dark {
22 | --primary-color: #e63946;
23 | --primary-color-lighter: #e25761;
24 | --primary-color-darker: #a22831;
25 | --primary-color-accent: #cee5f6;
26 | --primary-text-color: #eee;
27 |
28 | /* Contrast colors */
29 | --contrast-color-light: #fff;
30 | --contrast-color-dark: #1d3557;
31 |
32 | /* background-colors */
33 | --page-background: #333;
34 | --footer-background: #4f4f4f;
35 |
36 | --text-color: white;
37 |
38 | --markdown-octicon-link: white;
39 | --markdown-syntax-background-color: #a0a0a0;
40 | --markdown-link-color: #fb7881;
41 | --markdown-blockquote-color: #c9e3ff;
42 | }
43 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_assets/webmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Rocket",
3 | "short_name": "Rocket",
4 | "theme_color": "#e63946",
5 | "background_color": "#1d3557",
6 | "display": "standalone",
7 | "orientation": "portrait",
8 | "Scope": "/",
9 | "start_url": "/",
10 | "icons": [
11 | {
12 | "src": "../_merged_assets/_static/icons/android-chrome-192x192.png",
13 | "sizes": "128x128",
14 | "type": "image/png"
15 | },
16 | {
17 | "src": "../_merged_assets/_static/icons/android-chrome-512x512.png",
18 | "sizes": "512x512",
19 | "type": "image/png"
20 | },
21 | {
22 | "src": "../_merged_assets/_static/icons/maskable-icon.jpg",
23 | "sizes": "1024x1024",
24 | "type": "image/jpg",
25 | "purpose": "any maskable"
26 | }
27 | ],
28 | "splash_pages": null
29 | }
30 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_data/footer.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Discover",
4 | "children": [
5 | {
6 | "text": "Help and Feedback",
7 | "href": "https://github.com/stoxy-js/stoxy/issues"
8 | }
9 | ]
10 | },
11 | {
12 | "name": "Follow",
13 | "children": [
14 | {
15 | "text": "GitHub",
16 | "href": "https://github.com/stoxy-js/stoxy"
17 | },
18 | {
19 | "text": "Twitter",
20 | "href": "https://twitter.com/matsuuu_"
21 | }
22 | ]
23 | },
24 | {
25 | "name": "Support",
26 | "children": [
27 | {
28 | "text": "Contribute",
29 | "href": "https://github.com/stoxy-js/stoxy/issues"
30 | }
31 | ]
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/docs/_site-dev/_merged_data/rocketLaunch.json:
--------------------------------------------------------------------------------
1 | {
2 | "homeLayout": "logo",
3 | "newsletter": false
4 | }
5 |
--------------------------------------------------------------------------------
/docs/_site/040559f3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/040559f3.png
--------------------------------------------------------------------------------
/docs/_site/0477ceda.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/0477ceda.png
--------------------------------------------------------------------------------
/docs/_site/0d2fe2f7.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/_site/1927b521.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/1927b521.png
--------------------------------------------------------------------------------
/docs/_site/1c0b28b1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/1c0b28b1.png
--------------------------------------------------------------------------------
/docs/_site/1cbaf32c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/1cbaf32c.png
--------------------------------------------------------------------------------
/docs/_site/1e9e0c25.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/1e9e0c25.png
--------------------------------------------------------------------------------
/docs/_site/1f9f77a0.js:
--------------------------------------------------------------------------------
1 | import{L as t,e as r,h as o}from"./8e4cba22.js";let i,e,n=t=>t;customElements.define("inline-notification",class extends t{static get properties(){return{type:{type:String,reflect:!0},title:{type:String}}}constructor(){super(),this.title="",this.type="tip"}static get styles(){return r(i||(i=n`
2 | :host {
3 | padding: 0.1rem 1.5rem;
4 | border-left-width: 0.5rem;
5 | border-left-style: solid;
6 | margin: 1rem 0;
7 | display: block;
8 | }
9 |
10 | h3 {
11 | font-weight: 600;
12 | margin-bottom: 7px;
13 | text-transform: uppercase;
14 | }
15 |
16 | :host([type='tip']) {
17 | background-color: var(--inline-notification-tip-background-color, rgba(221, 221, 221, 0.3));
18 | border-color: var(--inline-notification-tip-border-color, #42b983);
19 | }
20 |
21 | :host([type='warning']) {
22 | background-color: var(
23 | --inline-notification-warning-background-color,
24 | rgba(255, 229, 100, 0.2)
25 | );
26 | border-color: var(--inline-notification-warning-border-color, #e7c000);
27 | }
28 |
29 | :host([type='danger']) {
30 | background-color: var(--inline-notification-danger-background-color, rgba(192, 0, 0, 0.1));
31 | border-color: var(--inline-notification-danger-border-color, #c00);
32 | }
33 |
34 | :host([type='warning']) h3 {
35 | color: var(--inline-notification-warning-heading-color, #b29400);
36 | }
37 |
38 | :host([type='danger']) h3 {
39 | color: var(--inline-notification-danger-heading-color, #900);
40 | }
41 |
42 | ::slotted(p) {
43 | line-height: 1.7;
44 | }
45 | `))}render(){return o(e||(e=n`
46 |
${0}
47 |
48 | `),this.title?this.title:this.type)}});
49 |
--------------------------------------------------------------------------------
/docs/_site/31c92193.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/31c92193.png
--------------------------------------------------------------------------------
/docs/_site/378e9adb.js:
--------------------------------------------------------------------------------
1 | import"./1f9f77a0.js";import"./8e4cba22.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/378e9adb2.js:
--------------------------------------------------------------------------------
1 | import"./1f9f77a0.js";import"./8e4cba22.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/378e9adb3.js:
--------------------------------------------------------------------------------
1 | import"./1f9f77a0.js";import"./8e4cba22.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/3ae7b943.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/3ae7b943.png
--------------------------------------------------------------------------------
/docs/_site/3d9b4148.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/3d9b4148.png
--------------------------------------------------------------------------------
/docs/_site/4b25b9fa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/4b25b9fa.png
--------------------------------------------------------------------------------
/docs/_site/50d23703.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370310.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370311.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370312.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370313.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370314.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370315.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370316.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370317.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370318.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370319.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237032.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370320.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370321.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370322.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370323.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370324.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370325.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370326.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370327.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370328.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370329.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237033.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370330.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370331.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370332.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370333.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370334.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370335.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370336.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370337.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370338.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d2370339.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237034.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237035.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237036.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237037.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237038.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/50d237039.js:
--------------------------------------------------------------------------------
1 | import"./87893830.js";import"./8e4cba22.js";import"./1ae651f9.js";const e=document.querySelector("#sidebar"),o=document.querySelectorAll('[data-action="trigger-mobile-menu"]');for(const t of[...o])t.addEventListener("click",(function(){e.opened=!0}));
2 |
--------------------------------------------------------------------------------
/docs/_site/5a52bfde.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/5a52bfde.png
--------------------------------------------------------------------------------
/docs/_site/5a767252.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/5a767252.png
--------------------------------------------------------------------------------
/docs/_site/6d016687.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/6d016687.png
--------------------------------------------------------------------------------
/docs/_site/72033f3a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/72033f3a.png
--------------------------------------------------------------------------------
/docs/_site/7f28a89b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/7f28a89b.png
--------------------------------------------------------------------------------
/docs/_site/7fd38230.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/7fd38230.png
--------------------------------------------------------------------------------
/docs/_site/8084ba1d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/8084ba1d.png
--------------------------------------------------------------------------------
/docs/_site/8db0b317.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/8db0b317.png
--------------------------------------------------------------------------------
/docs/_site/8ec74bec.css:
--------------------------------------------------------------------------------
1 | html {
2 | --primary-color: #232629;
3 | --primary-color-lighter: #474d53;
4 | --primary-color-darker: #353a3e;
5 | --primary-color-accent: #596168;
6 | --primary-text-color: #232629;
7 | --primary-lines-color: #ccc;
8 |
9 | /* Contrast colors */
10 | --contrast-color-light: #fff;
11 | --contrast-color-dark: #1d3557;
12 |
13 | /* background-colors */
14 | --page-background: white;
15 | --footer-background: #232629;
16 | --footer-text-color: #FFF;
17 |
18 | --text-color: #232629;
19 | }
20 |
21 | html.dark {
22 | --primary-color: #e63946;
23 | --primary-color-lighter: #e25761;
24 | --primary-color-darker: #a22831;
25 | --primary-color-accent: #cee5f6;
26 | --primary-text-color: #eee;
27 |
28 | /* Contrast colors */
29 | --contrast-color-light: #fff;
30 | --contrast-color-dark: #1d3557;
31 |
32 | /* background-colors */
33 | --page-background: #333;
34 | --footer-background: #4f4f4f;
35 |
36 | --text-color: white;
37 |
38 | --markdown-octicon-link: white;
39 | --markdown-syntax-background-color: #a0a0a0;
40 | --markdown-link-color: #fb7881;
41 | --markdown-blockquote-color: #c9e3ff;
42 | }
43 |
--------------------------------------------------------------------------------
/docs/_site/8f9b4959.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/8f9b4959.png
--------------------------------------------------------------------------------
/docs/_site/964d560d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/964d560d.png
--------------------------------------------------------------------------------
/docs/_site/99517503.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/99517503.png
--------------------------------------------------------------------------------
/docs/_site/9b45579a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/9b45579a.png
--------------------------------------------------------------------------------
/docs/_site/9e097e6a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/9e097e6a.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/404/bg_purple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/404/bg_purple.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/404/overlay_stars.svg:
--------------------------------------------------------------------------------
1 |
5 |
6 | overlay_stars_1
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/icon-128x128.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/icon-512x512.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/maskable-icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/maskable-icon-128x128.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/maskable-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/maskable-icon.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/_merged_assets/_static/icons/mstile-150x150.png
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/icons/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 | Created by potrace 1.11, written by Peter Selinger 2001-2013
9 |
10 |
12 |
14 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/_site/_merged_assets/_static/noscript.css:
--------------------------------------------------------------------------------
1 | /* override to add noscript styles */
2 |
--------------------------------------------------------------------------------
/docs/_site/a3e0bbf4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/a3e0bbf4.png
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c1.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c110.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c111.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c112.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c113.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c114.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c115.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c116.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c117.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c118.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c119.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c12.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c120.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c121.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c122.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c123.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c124.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c125.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c126.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c127.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c128.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c129.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c13.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c130.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c131.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c132.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c133.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c134.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c135.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c136.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c137.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c138.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c139.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c14.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c15.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c16.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c17.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c18.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a6d6f7c19.js:
--------------------------------------------------------------------------------
1 | import"./ca2b0b57.js";import"./8e4cba22.js";import"./1ae651f9.js";
2 |
--------------------------------------------------------------------------------
/docs/_site/a7ac5b27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/a7ac5b27.png
--------------------------------------------------------------------------------
/docs/_site/a9f3a3a3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/a9f3a3a3.png
--------------------------------------------------------------------------------
/docs/_site/af3902fd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/af3902fd.png
--------------------------------------------------------------------------------
/docs/_site/assets/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/assets/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/_site/assets/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/assets/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/_site/assets/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/assets/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/_site/assets/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 | Created by potrace 1.11, written by Peter Selinger 2001-2013
9 |
10 |
12 |
14 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/_site/assets/webmanifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Rocket",
3 | "short_name": "Rocket",
4 | "theme_color": "#e63946",
5 | "background_color": "#1d3557",
6 | "display": "standalone",
7 | "orientation": "portrait",
8 | "Scope": "/",
9 | "start_url": "/",
10 | "icons": [
11 | {
12 | "src": "../_merged_assets/_static/icons/android-chrome-192x192.png",
13 | "sizes": "128x128",
14 | "type": "image/png"
15 | },
16 | {
17 | "src": "../_merged_assets/_static/icons/android-chrome-512x512.png",
18 | "sizes": "512x512",
19 | "type": "image/png"
20 | },
21 | {
22 | "src": "../_merged_assets/_static/icons/maskable-icon.jpg",
23 | "sizes": "1024x1024",
24 | "type": "image/jpg",
25 | "purpose": "any maskable"
26 | }
27 | ],
28 | "splash_pages": null
29 | }
30 |
--------------------------------------------------------------------------------
/docs/_site/b8c01bc2.css:
--------------------------------------------------------------------------------
1 | /* feel free to override this file for your page - add a file docs/_assets/style.css */
2 |
3 | body[layout^='layout-home'] .markdown-body .call-to-action:nth-of-type(2) {
4 | --primary-color: #222;
5 | --primary-color-lighter: #333;
6 | --primary-color-darker: #000;
7 | }
8 |
9 | @media screen and (min-width: 1024px) {
10 | body[layout='layout-home-background'] .page-background {
11 | top: -210px;
12 | right: -463px;
13 | transform: rotate(45deg);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/docs/_site/c4e76b46.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/c4e76b46.png
--------------------------------------------------------------------------------
/docs/_site/cf441905.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/cf441905.png
--------------------------------------------------------------------------------
/docs/_site/d3699997.css:
--------------------------------------------------------------------------------
1 | /** BLOG OVERVIEW **************************************************************************/
2 |
3 | body[layout='layout-blog-details'] rocket-navigation > ul > li.current::before {
4 | display: none;
5 | }
6 |
7 | body[layout='layout-blog-details'] #sidebar-nav li.anchor a:hover::before {
8 | display: none;
9 | }
10 |
11 | .articles {
12 | display: flex;
13 | justify-content: center;
14 | align-items: center;
15 | padding-top: 40px;
16 |
17 | /* css flexbox gap workaround https://coryrylan.com/blog/css-gap-space-with-flexbox */
18 | --gap: 60px;
19 | display: inline-flex;
20 | flex-wrap: wrap;
21 | margin: calc(-1 * var(--gap)) 0 0 calc(-1 * var(--gap));
22 | width: calc(100% + var(--gap));
23 | }
24 |
25 | .articles article {
26 | flex: 0 1 360px;
27 | margin: var(--gap) 0 0 var(--gap);
28 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
29 | transition: 0.3s;
30 | }
31 |
32 | .articles article h2 {
33 | margin: 0;
34 | border: none;
35 | }
36 |
37 | .articles article .read {
38 | display: block;
39 | text-align: right;
40 | }
41 |
42 | .articles article .content {
43 | padding: 10px;
44 | }
45 |
46 | .articles article:hover {
47 | box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
48 | }
49 |
50 | @media screen and (min-width: 1024px) {
51 | body[layout='layout-blog-details'] #sidebar {
52 | display: block;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/docs/_site/d5f3c88e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/d5f3c88e.png
--------------------------------------------------------------------------------
/docs/_site/dbab1826.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/dbab1826.png
--------------------------------------------------------------------------------
/docs/_site/dd041e77.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/dd041e77.png
--------------------------------------------------------------------------------
/docs/_site/e3ddea26.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/e3ddea26.png
--------------------------------------------------------------------------------
/docs/_site/eeb55bd7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/eeb55bd7.png
--------------------------------------------------------------------------------
/docs/_site/f39f33b7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/f39f33b7.png
--------------------------------------------------------------------------------
/docs/_site/f56c2bb7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/f56c2bb7.png
--------------------------------------------------------------------------------
/docs/_site/f6087910.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/f6087910.png
--------------------------------------------------------------------------------
/docs/_site/fb6ea901.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/fb6ea901.png
--------------------------------------------------------------------------------
/docs/_site/fc65943c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/_site/fc65943c.png
--------------------------------------------------------------------------------
/docs/docs/404.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout-404
3 | permalink: 404.html
4 |
--------------------------------------------------------------------------------
/docs/docs/_assets/11ty-img/ffa575e1-1200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/11ty-img/ffa575e1-1200.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/android-chrome-192x192.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/android-chrome-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/android-chrome-512x512.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | #da532c
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/favicon-16x16.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/favicon-32x32.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/favicon.ico
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/_static/icons/mstile-150x150.png
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
7 |
8 | Created by potrace 1.11, written by Peter Selinger 2001-2013
9 |
10 |
12 |
14 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/docs/docs/_assets/_static/icons/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "",
3 | "short_name": "",
4 | "icons": [
5 | {
6 | "src": "/android-chrome-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png"
9 | },
10 | {
11 | "src": "/android-chrome-512x512.png",
12 | "sizes": "512x512",
13 | "type": "image/png"
14 | }
15 | ],
16 | "theme_color": "#ffffff",
17 | "background_color": "#ffffff",
18 | "display": "standalone"
19 | }
20 |
--------------------------------------------------------------------------------
/docs/docs/_assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/logo.png
--------------------------------------------------------------------------------
/docs/docs/_assets/stoxy_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/stoxy_icon.png
--------------------------------------------------------------------------------
/docs/docs/_assets/stoxy_icon_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stoxy-js/stoxy/c8105de261036633055d0d8886c2a2da3163705a/docs/docs/_assets/stoxy_icon_alt.png
--------------------------------------------------------------------------------
/docs/docs/_assets/variables.css:
--------------------------------------------------------------------------------
1 | html {
2 | --primary-color: #232629;
3 | --primary-color-lighter: #474d53;
4 | --primary-color-darker: #353a3e;
5 | --primary-color-accent: #596168;
6 | --primary-text-color: #232629;
7 | --primary-lines-color: #ccc;
8 |
9 | /* Contrast colors */
10 | --contrast-color-light: #fff;
11 | --contrast-color-dark: #1d3557;
12 |
13 | /* background-colors */
14 | --page-background: white;
15 | --footer-background: #232629;
16 | --footer-text-color: #FFF;
17 |
18 | --text-color: #232629;
19 | }
20 |
21 | html.dark {
22 | --primary-color: #e63946;
23 | --primary-color-lighter: #e25761;
24 | --primary-color-darker: #a22831;
25 | --primary-color-accent: #cee5f6;
26 | --primary-text-color: #eee;
27 |
28 | /* Contrast colors */
29 | --contrast-color-light: #fff;
30 | --contrast-color-dark: #1d3557;
31 |
32 | /* background-colors */
33 | --page-background: #333;
34 | --footer-background: #4f4f4f;
35 |
36 | --text-color: white;
37 |
38 | --markdown-octicon-link: white;
39 | --markdown-syntax-background-color: #a0a0a0;
40 | --markdown-link-color: #fb7881;
41 | --markdown-blockquote-color: #c9e3ff;
42 | }
43 |
--------------------------------------------------------------------------------
/docs/docs/_data/eleventyComputed.cjs:
--------------------------------------------------------------------------------
1 | const { generateEleventyComputed } = require('@rocket/cli');
2 |
3 | module.exports = {
4 | ...generateEleventyComputed(),
5 | };
6 |
--------------------------------------------------------------------------------
/docs/docs/_data/footer.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "Discover",
4 | "children": [
5 | {
6 | "text": "Help and Feedback",
7 | "href": "https://github.com/stoxy-js/stoxy/issues"
8 | }
9 | ]
10 | },
11 | {
12 | "name": "Follow",
13 | "children": [
14 | {
15 | "text": "GitHub",
16 | "href": "https://github.com/stoxy-js/stoxy"
17 | },
18 | {
19 | "text": "Twitter",
20 | "href": "https://twitter.com/matsuuu_"
21 | }
22 | ]
23 | },
24 | {
25 | "name": "Support",
26 | "children": [
27 | {
28 | "text": "Contribute",
29 | "href": "https://github.com/stoxy-js/stoxy/issues"
30 | }
31 | ]
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/docs/docs/_data/rocketConfig.cjs:
--------------------------------------------------------------------------------
1 | const { getComputedConfig } = require('@rocket/cli');
2 |
3 | module.exports = getComputedConfig();
4 |
--------------------------------------------------------------------------------
/docs/docs/_data/rocketLaunch.json:
--------------------------------------------------------------------------------
1 | {
2 | "homeLayout": "logo",
3 | "newsletter": false
4 | }
5 |
--------------------------------------------------------------------------------
/docs/docs/_data/site.cjs:
--------------------------------------------------------------------------------
1 | module.exports = function () {
2 | return {
3 | dir: 'ltr',
4 | lang: 'en',
5 | name: 'Stoxy',
6 | description: 'The reactive state management system for all modern Web Technologies',
7 | socialLinks: [
8 | {
9 | name: 'GitHub',
10 | url: 'https://github.com/stoxy-js/stoxy',
11 | },
12 | ],
13 | gitSiteUrl: 'https://github.com/stoxy-js/stoxy',
14 | gitBranch: 'master',
15 | helpUrl: 'https://github.com/stoxy-js/stoxy/issues',
16 | logoAlt: 'Rocket Logo',
17 | iconColorMaskIcon: '#232629',
18 | iconColorMsapplicationTileColor: '#1d3557',
19 | iconColorThemeColor: '#1d3557',
20 | };
21 | };
22 |
--------------------------------------------------------------------------------
/docs/docs/_data/siteUrl.cjs:
--------------------------------------------------------------------------------
1 | let url = 'https://stoxy.dev/';
2 |
3 | // handling netlify previews
4 | switch (process.env.CONTEXT) {
5 | case 'production':
6 | url = process.env.URL;
7 | break;
8 | case 'deploy-preview':
9 | url = process.env.DEPLOY_URL;
10 | break;
11 | case 'branch-deploy':
12 | url = process.env.DEPLOY_PRIME_URL;
13 | break;
14 | /* no default */
15 | }
16 |
17 | module.exports = url;
18 |
--------------------------------------------------------------------------------
/docs/docs/_includes/_joiningBlocks/_layoutHome/content/10-hero.njk:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% if rocketLaunch.homeLayout === 'background' %}
4 |
5 | {% endif %}
6 |
7 | {{title}}
8 |
9 | {{slogan}}
10 |
11 |
16 |
--------------------------------------------------------------------------------
/docs/docs/_includes/_joiningBlocks/_layoutSidebar/content/100-footer.njk:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/docs/docs/_includes/_joiningBlocks/header/20-logo.njk:
--------------------------------------------------------------------------------
1 | {% if layout === "home.njk" and rocketLaunch.homeLayout === "background" %}
2 |
3 |
4 | {{ site.name }}
5 |
6 | {% else %}
7 | {% include 'partials/_shared/logoLink.njk' %}
8 | {% endif %}
9 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutHome/_layoutHome/content.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks._layoutHome.content %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutHome/_layoutHome/sidebar.njk:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutHome/content.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks._layoutHome.content %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutHome/sidebar.njk:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutIndex/content.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks._layoutIndex.content %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutSidebar/content.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks._layoutSidebar.content %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_layoutSidebar/sidebar.njk:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_shared/blog-content-footer.njk:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_shared/darkSwitch.njk:
--------------------------------------------------------------------------------
1 | Toggle darkmode
2 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/_shared/logoLink.njk:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ site.name }}
4 |
5 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/bottom.njk:
--------------------------------------------------------------------------------
1 | {% for blockName, blockPath in _joiningBlocks.bottom %}
2 | {% include blockPath %}
3 | {% endfor %}
4 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/content.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks.content %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/darkModeJs.njk:
--------------------------------------------------------------------------------
1 |
41 |
42 |
43 |
69 |
70 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/footer.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks.footer %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/head.njk:
--------------------------------------------------------------------------------
1 |
2 | {% for blockName, blockPath in _joiningBlocks.head %}
3 | {% include blockPath %}
4 | {% endfor %}
5 |
6 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/header.njk:
--------------------------------------------------------------------------------
1 |
2 |
3 | {% for blockName, blockPath in _joiningBlocks.header %}
4 | {% include blockPath %}
5 | {% endfor %}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/docs/docs/_includes/partials/mobile-sidebar-bottom.njk:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/docs/docs/blog/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Stoxy Blog
3 | layout: layout-blog-overview
4 | eleventyNavigation:
5 | key: Blog
6 | order: 30
7 | pagination:
8 | data: collections.blog
9 | size: 10
10 | reverse: true
11 | alias: posts
12 | ---
13 |
--------------------------------------------------------------------------------
/docs/docs/docs/components/index.md:
--------------------------------------------------------------------------------
1 | # Components || 20
2 |
--------------------------------------------------------------------------------
/docs/docs/docs/components/stoxy-form.md:
--------------------------------------------------------------------------------
1 | # Components >> Stoxy Form
2 |
3 | Stoxy Form is a web component used for handling Stoxy state without
4 | having to write any javascript.
5 |
6 | On submit, the form persists the form's data to state with the given key attribute.
7 |
8 | If the url attribute is set, the form creates a HTTP request before saving the data to state.
9 |
10 | ### Attributes
11 |
12 | | Name | Attribute |
13 | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14 | | key | Key in string form. Used as the name of the state object |
15 | | action | Either _add_ or _set_ dependeing on wanted to add to a colleciton in state, or deplace the state |
16 | | url | In some cases you might want to send the form data to the backend. For these situations you can declare the url property. If set, sends a fetch request to given url on submit. |
17 | | method | If url is set, specifies the HTTP method used for the request. Defaults to GET |
18 | | requireok | If url is set, specifies if the HTTP request is required to return a OK status before committing the object to state. |
19 |
20 | ### Usage
21 |
22 |
23 | ```js copy
24 | import '@stoxy/form';
25 | ```
26 |
27 | ```html copy
28 | {
32 | this.shadowRoot.querySelector('input').value = '';
33 | }}
34 | >
35 |
41 |
42 |
43 |
44 | ```
45 |
46 | Adds
47 |
48 | ```js copy
49 | { task: "Your input" }
50 | ```
51 |
52 | to the state at key "todos".
53 |
54 | #### Sending the form data to a API on submit
55 |
56 | In some cases we might want to send the data from the form to a backend API while we save it to our state at the
57 | same time. This can be done by utilizing the stoxy-form's `url` attribute.
58 |
59 |
60 | ```js copy
61 | import '@stoxy/form';
62 | ```
63 |
64 | ```html copy
65 | {
72 | this.shadowRoot.querySelector('input').value = '';
73 | }}
74 | >
75 |
81 |
82 |
83 |
84 | ```
85 |
86 | In the above case, a POST request would be made to `https://my-website.app/todoadd`, with the body
87 | `{ task: "Your input" }`.
88 |
89 | The `requireok` attribute means that unless we get a OK response from the backend, we won't save the
90 | data to state either.
91 |
92 |
--------------------------------------------------------------------------------
/docs/docs/docs/components/stoxy-object.md:
--------------------------------------------------------------------------------
1 | # Components >> Stoxy Object
2 |
3 | Stoxy Object is a web component used for sections of content, where you want to
4 | access multiple keys of a single state object.
5 |
6 | This can be useful for example when generating user profile pages.
7 |
8 | As with all of Stoxy elements, Stoxy Object also updates it's contents automatically
9 | as the state changes. No action needed from the developer side.
10 |
11 | ```js script
12 | import '@rocket/launch/inline-notification/inline-notification.js';
13 | ```
14 |
15 |
16 |
17 | As with all of Stoxy elements, Stoxy Object also updates it's contents automatically
18 | as the state changes. No action needed from the developer side.
19 |
20 |
21 |
22 | ### Attributes
23 |
24 | | Name | Attribute |
25 | | ------ | ------------------------------------------------------------------------------------------------------------------- |
26 | | key | Key in string form. Used as the name of the state object |
27 | | prefix | Prefix to access wanted state object properties. Makes it possible for Stoxy to recognize plain strings to replace. |
28 |
29 | ### Events
30 |
31 | | Name | Attribute |
32 | | ------- | ------------------------------------------------------------------------------------------------------------------------ |
33 | | updated | Triggers when the state object observed by the stoxy element is updated. Event detail contains data about the new state. |
34 |
35 | ### Usage
36 |
37 | With a state object of
38 |
39 | ```js copy
40 | import '@stoxy/object';
41 | import { write } from 'stoxy';
42 |
43 | const userData = {
44 | name: 'Matsuuu',
45 | favoriteAnimal: 'Cats',
46 | country: {
47 | countryName: 'Finland',
48 | countryCode: 'FI',
49 | },
50 | };
51 |
52 | write('user', userData);
53 | ```
54 |
55 | we could do:
56 |
57 | ```html copy
58 |
59 | Hello, World!
60 |
61 | My name is: u.name, and I'm from u.country.countryName (u.country.countryCode).
62 | My favorite animal is: u.favoriteAnimal
63 |
64 | ```
65 |
66 | And end up with
67 |
68 | ```html copy
69 |
70 | Hello, World!
71 |
72 | My name is: Matsu, and I'm from Finland (FI).
73 | My favorite animal is: Cats
74 |
75 | ```
76 |
--------------------------------------------------------------------------------
/docs/docs/docs/components/stoxy-repeat.md:
--------------------------------------------------------------------------------
1 | # Components >> Stoxy Repeat
2 |
3 | Stoxy Repeat is a web component used for iterating state content onto the web page.
4 |
5 | The repeat component is useful for situations where the state object is iterable
6 | and is desired to be displayed as e.g. a list
7 |
8 | ```js script
9 | import '@rocket/launch/inline-notification/inline-notification.js';
10 | ```
11 |
12 |
13 |
14 | As with all of Stoxy elements, Stoxy Repeat also updates it's contents automatically
15 | as the state changes. No action needed from the developer side.
16 |
17 |
18 |
19 | ### Attributes
20 |
21 | | Name | Attribute |
22 | | ---- | -------------------------------------------------------- |
23 | | key | Key in string form. Used as the name of the state object |
24 | | id | Identifier for the accessed iterable object |
25 |
26 | ### Events
27 |
28 | | Name | Attribute |
29 | | ------- | ------------------------------------------------------------------------------------------------------------------------ |
30 | | updated | Triggers when the state object observed by the stoxy element is updated. Event detail contains data about the new state. |
31 |
32 | ### Usage
33 |
34 | With a state object of
35 |
36 | ```js copy
37 | import "@stoxy/repeat";
38 | import { write } from 'stoxy';
39 |
40 | const todos = [
41 | { task: "Take out the trash" }
42 | { task: "Write documentation" },
43 | { task: "Eat healthy" }
44 | ];
45 |
46 | write("todos", todos);
47 | ```
48 |
49 | we could do:
50 |
51 | ```html copy
52 |
53 | todoItem.task
54 |
55 | ```
56 |
57 | And end up with
58 |
59 | ```html copy
60 |
61 | Take out the trash
62 | Write documentation
63 | Eat healthy
64 |
65 | ```
66 |
--------------------------------------------------------------------------------
/docs/docs/docs/components/stoxy-string.md:
--------------------------------------------------------------------------------
1 | # Components >> Stoxy String
2 |
3 | Stoxy String is a web component used for situtations, where you want to
4 | display a single state object in the DOM, for example the current item count.
5 |
6 | As with all of Stoxy elements, Stoxy String also updates it's contents automatically
7 | as the state changes. No action needed from the developer side.
8 |
9 | ```js script
10 | import '@rocket/launch/inline-notification/inline-notification.js';
11 | ```
12 |
13 |
14 |
15 | As with all of Stoxy elements, Stoxy String also updates it's contents automatically
16 | as the state changes. No action needed from the developer side.
17 |
18 |
19 |
20 | ### Attributes
21 |
22 | | Name | Attribute |
23 | | ------- | ----------------------------------------------- |
24 | | default | Default value of the string, if no value is set |
25 |
26 | ### Events
27 |
28 | | Name | Attribute |
29 | | ------- | ------------------------------------------------------------------------------------------------------------------------ |
30 | | updated | Triggers when the state object observed by the stoxy element is updated. Event detail contains data about the new state. |
31 |
32 | ### Usage
33 |
34 | ```js copy
35 | import '@stoxy/stoxy-string';
36 | ```
37 |
38 | ```html copy
39 | itemcount
40 | ```
41 |
42 | Say the state object of `itemcount` was 5 at the moment, we would have our DOM as:
43 |
44 | ```html copy
45 | 5
46 | ```
47 |
--------------------------------------------------------------------------------
/docs/docs/docs/hooks/index.md:
--------------------------------------------------------------------------------
1 | # Hooks || 10
2 |
--------------------------------------------------------------------------------
/docs/docs/docs/index.md:
--------------------------------------------------------------------------------
1 | # Docs
2 |
3 | ## Motivation
4 |
5 | The motivation behind Stoxy as to provide a simpler solution for cross-app state management.
6 |
7 | With Stoxy you are up and running after writing just one line of code. After setting your first state object,
8 | you have a functional state system ready to be used.
9 |
10 | ```js copy
11 | import { write } from "@stoxy/core";
12 |
13 | write("users", userList);
14 | ```
15 |
16 | ### Simplicity
17 |
18 | All of Stoxy's commands are 1-2 parameters long, and can be executed as "one-liners".
19 |
20 | They are however extremely extendable due to the nature of the state management system of Stoxy. Some of the Stoxy core
21 | functions like `update` and `remove` even take delegates or predicates as a parameter to give the developer
22 | more control over their state management.
23 |
24 | ### Ecosystem
25 |
26 | Stoxy ships with a small set of Web Components, which are framework agnostic components ready for use in any project.
27 |
28 | The components are built to as reactive pieces of an application, updating their contents accordin to state
29 | change without the developer having to do any work.
30 |
31 | ### Persistence
32 |
33 | Stoxy comes shipped with persistence out of the box. There are many cases in which it is beneficial to persist the state
34 | data through page reloads and navigation. Wether it be stale-while-revalidate patterns, or just static information fetched
35 | from the API.
36 |
37 | The Persistence in Stoxy is opt-in, meaning that you control exactly what information gets persisted.
38 |
39 |
40 | ### Use them how you want to
41 |
42 | The whole core set of Stoxy is built from smaller modules, which can be attached at will.
43 |
44 | This means that you can use Stoxy only for managing state, and then handle all the events through subscribers,
45 | or you can go all in on Stoxy and deploy a whole application built with stoxy elements using barely any Javascript
46 |
47 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/add.md:
--------------------------------------------------------------------------------
1 | # Methods >> Add
2 |
3 | Add an element to the state object array by key.
4 |
5 | If not state atom for key is set, an empty array is initialized before adding object.
6 |
7 | Returns a promise.
8 |
9 | ### Params
10 |
11 | | Name | Attribute |
12 | | ----- | -------------------------------------------------------- |
13 | | key | Key in string form. Used as the name of the state object |
14 | | value | Any possible storable value |
15 |
16 | ### Returns
17 |
18 | A promise which resolves to the write result of the object: `{key: string, value: any}`
19 |
20 | ### Usage
21 |
22 | ```js copy
23 | import { add } from '@stoxy/core';
24 |
25 | const product = { id: 123, name: 'Flaming hot Cheetos' };
26 | add('shoppingcart', product);
27 | ```
28 |
29 | The Add method is useful when managing an array of objects in state, e.g. users, products etc.
30 |
31 |
32 | #### Specific add
33 |
34 | You can also add a property of a state object's property just as easily as you would the whole state object
35 |
36 | This is exteremely handy when you have a array as a property of you state object
37 |
38 | With a state object like
39 |
40 | ```json copy
41 | const userData = {
42 | userName: "Stoxy",
43 | shoppingCart: [
44 | { id: 123, name: "Flaming hot cheetos" }
45 | ],
46 | shoppingHistory: {
47 | latestProducts: [
48 | { id: 555, name: "Doritos" },
49 | { id: 958, name: "Pringles" }
50 | ]
51 | }
52 | };
53 | ```
54 |
55 | One could add a product to the cart with just
56 |
57 |
58 | ```js copy
59 | import { add } from '@stoxy/core';
60 |
61 | const product = { id: 555, name: "Doritos" };
62 | add("userData.shoppingCart", product);
63 | ```
64 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/clear.md:
--------------------------------------------------------------------------------
1 | # Methods >> Clear
2 |
3 | Clear state object from state cache and IndexedDB (is persisted).
4 |
5 | Clears the state object with the given key.
6 |
7 | Return a promise.
8 |
9 | ### Params
10 |
11 | | Name | Attribute |
12 | | ---- | -------------------------------------------------------- |
13 | | key | Key in string form. Used as the name of the state object |
14 |
15 | ### Returns
16 |
17 | A void promise
18 |
19 | ### Usage
20 |
21 | ```js copy
22 | import { clear } from '@stoxy/core';
23 |
24 | clear('shoppingcart');
25 | ```
26 |
27 | The Add method is useful when managing an array of objects in state, e.g. users, products etc.
28 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/index.md:
--------------------------------------------------------------------------------
1 | # Methods || 10
2 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/persist-key.md:
--------------------------------------------------------------------------------
1 | # Methods >> Persist Key
2 |
3 | Declare a state object to be persisted through pageloads.
4 |
5 | Stoxy utilized IndexedDB to persist state objects. There could be two reasons you would want to persist your state objects:
6 |
7 | - Persisted state objects are peristed through page page reloads / sessions
8 | - Persisted state objects can be removed from cache, and only fetched when needed
9 |
10 | ### Params
11 |
12 | | Name | Attribute |
13 | | --------- | ------------------------------------------------ |
14 | | keyOrKeys | One or more keys as string, separated by a comma |
15 |
16 |
17 | ### Returns
18 |
19 | void
20 |
21 | ### Usage
22 |
23 | ```js copy
24 | import { persistKey } from '@stoxy/core';
25 |
26 | persistKey('shoppingcart');
27 |
28 | // with multiple keys
29 | persistKey('shoppingcart', 'history', 'address');
30 | ```
31 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/read.md:
--------------------------------------------------------------------------------
1 | # Methods >> Read
2 |
3 | Get the state object data from Stoxy.
4 |
5 | Returns a promise, which when resolved contains the state object data.
6 |
7 | ### Params
8 |
9 | | Name | Attribute |
10 | | ---- | -------------------------------------------------------- |
11 | | key | Key in string form. Used as the name of the state object |
12 |
13 |
14 | ### Returns
15 |
16 | A promise which resolves to the read result of the object: `{any}`
17 |
18 | ### Usage
19 |
20 | ```js copy
21 | import { read } from '@stoxy/core';
22 |
23 | read('shoppingcart').then(shoppingCartItems => {
24 | shoppingCartItems.map(item => console.log(item));
25 | });
26 | ```
27 |
28 | ```js copy
29 | import { read } from '@stoxy/core';
30 |
31 | async function getItems() {
32 | const items = await read('shoppingcart');
33 | return items;
34 | }
35 | ```
36 |
37 | #### Specific read
38 |
39 | You can also read a property of a state object just as easily as you would the whole state object
40 |
41 | This is exteremely handy when you don't need the whole state object at the same time.
42 |
43 | With a state object like
44 |
45 | ```json copy
46 | const userData = {
47 | userName: "Stoxy",
48 | shoppingCart: [
49 | { id: 123, name: "Flaming hot cheetos" }
50 | ],
51 | shoppingHistory: {
52 | latestProducts: [
53 | { id: 555, name: "Doritos" },
54 | { id: 958, name: "Pringles" }
55 | ]
56 | }
57 | };
58 | ```
59 |
60 | One could access the latest products in the shoppinghistory of the user with
61 |
62 |
63 | ```js copy
64 | import { read } from '@stoxy/core';
65 |
66 | read("userData.shoppingHistory.latestProducts").then(latestHistoryProducts => {
67 | latestHistoryProducts.map(item => console.log(item));
68 | });
69 | ```
70 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/remove.md:
--------------------------------------------------------------------------------
1 | # Methods >> Remove
2 |
3 | Remove object(s) from a state object using a predicate.
4 |
5 | Allows for removing one of multiple objects from the state object without having to read the object data manually.
6 |
7 | ### Params
8 |
9 | | Name | Attribute |
10 | | ---- | -------------------------------------------------------- |
11 | | key | Key in string form. Used as the name of the state object |
12 | | predicate | The Predicate by which the objects are removed |
13 |
14 |
15 | ### Returns
16 |
17 | A promise which resolves to the write result of the object: `{key: string, value: any}`
18 |
19 | ### Usage
20 |
21 | ```js copy
22 | import { remove } from '@stoxy/core';
23 |
24 | // Removes product with the id 1
25 | remove("shoppingcart", product => product.id === 1);
26 | ```
27 | ---
28 |
29 | ```js copy
30 | import { remove } from '@stoxy/core';
31 |
32 | // Remove all products with a price over 5
33 | remove("shoppingcart", product => product.price > 5);
34 | ```
35 |
36 | ---
37 |
38 |
39 | ```js copy
40 | import { remove } from '@stoxy/core';
41 |
42 | // Remove all meat
43 | remove("shoppingcart", removeMeat);
44 |
45 | function removeMeat(product) {
46 | if (product.type === "Meat" || product.type === "Chicken") {
47 | return true;
48 | }
49 | return false;
50 | }
51 | ```
52 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/sub.md:
--------------------------------------------------------------------------------
1 | # Methods >> Sub
2 |
3 | Subscribe to updates in state of wanted object.
4 |
5 | Allows you to programmatically react to state changes in wanted state objects
6 |
7 | ### Params
8 |
9 | | Name | Attribute |
10 | | -------- | ------------------------------------------------------------ |
11 | | key | Key in string form. Used as the name of the state object |
12 | | callback | Callback Function to call when state of given key is updated |
13 |
14 |
15 | ### Returns
16 |
17 | Unsub function. The sub method adds event listeners to the DOM, so they need to be cleaned up to avoid
18 | memory leaks. Calling the returned unsub function will remove the listeners.
19 |
20 | ### Usage
21 |
22 | ```js copy
23 | import { sub } from '@stoxy/core';
24 |
25 | sub('shoppingcart', e => console.log('Shopping card updated. Current contents: ', e.data));
26 | ```
27 |
28 | ---
29 |
30 | ```js copy
31 | import { sub } from '@stoxy/core';
32 |
33 | sub('shoppingcart', updateItemCount);
34 |
35 | function updateItemCount(e) {
36 | write('itemcount', e.data.length);
37 | }
38 | ```
39 |
40 | ---
41 |
42 | ```js copy
43 | import { sub } from '@stoxy/core';
44 |
45 | const unsubber = sub('shoppingcart', updateItemCount);
46 |
47 | function updateItemCount(e) {
48 | write('itemcount', e.data.length);
49 | }
50 |
51 | // Unsubscribe from events
52 | unsubber();
53 | ```
54 |
55 | ### Callback payload
56 |
57 | The callback function is passed information about the event as a parameter, which can then be
58 | used to easily react to the change.
59 |
60 | ### Callback params
61 |
62 | | Name | Attribute |
63 | | ------ | -------------------------------------------------------------------------------------------------- |
64 | | key | Key in string form. Used as the name of the state object |
65 | | action | Action type or the update event (Update on content update, Delete on successful clear of said key) |
66 | | data | Current data in said state |
67 |
68 | ### Usage
69 |
70 | This can be used to easily react to the events happening with the state
71 |
72 | ```js copy
73 | import { sub } from '@stoxy/core';
74 |
75 | sub('shoppingcart', onShoppingcartUpdate);
76 |
77 | function onShoppingcartUpdate(e) {
78 | if (e.action === 'Update') {
79 | console.log('Shoppingcart updated');
80 | } else {
81 | console.log('Shoppingcart cleared');
82 | }
83 |
84 | fetch(myShoppingCardContentApiUrl, {
85 | method: 'POST',
86 | body: JSON.stringify(e.data),
87 | });
88 | }
89 | ```
90 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/update.md:
--------------------------------------------------------------------------------
1 | # Methods >> Update
2 |
3 | Update state without having to manually read the state object
4 |
5 | Useful for situtations, where you want to quickly update the state without having to excplicitly fetch the state object.
6 |
7 | ### Params
8 |
9 | | Name | Attribute |
10 | | -------- | -------------------------------------------------------- |
11 | | key | Key in string form. Used as the name of the state object |
12 | | delegate | Delegate function to update the state by |
13 |
14 | ### Returns
15 |
16 | A promise which resolves to the write result of the object: `{key: string, value: any}`
17 |
18 | ### Usage
19 |
20 | ```js copy
21 | import { write, update } from '@stoxy/core';
22 |
23 | write('counter', 0);
24 |
25 | // Update counter every second
26 | setInterval(() => {
27 | update('counter', counter => (counter += 1));
28 | }, 1000);
29 | ```
30 |
31 | #### Specific update
32 |
33 | You can also update a property of a state object just as easily as you would the whole state object
34 |
35 | This is exteremely handy when you don't need to update the whole state object at the same time.
36 |
37 | With a state object like
38 |
39 | ```json copy
40 | const userData = {
41 | userName: "Stoxy",
42 | customerPoints: 5,
43 | shoppingCart: [
44 | { id: 123, name: "Flaming hot cheetos" }
45 | ],
46 | shoppingHistory: {
47 | latestProducts: [
48 | { id: 555, name: "Doritos" },
49 | { id: 958, name: "Pringles" }
50 | ]
51 | }
52 | };
53 | ```
54 |
55 | One could update the customerPoints with one of the following ways
56 |
57 | ```js copy
58 | import { update } from '@stoxy/core';
59 |
60 | update('userData.customerPoints', points => (points += 100));
61 |
62 | // Or
63 |
64 | update('userData', userData => {
65 | userData.customerPoints += 100;
66 | return userData;
67 | });
68 | ```
69 |
70 | The latter way is more versatile in that you could run a larger update in the same delegate
71 |
72 | ```js copy
73 | update("userData", userData => {
74 | userData.customerPoints += 100;
75 | userData.userName = "foobar";
76 | return userData;
77 | });
78 | ```
79 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/where.md:
--------------------------------------------------------------------------------
1 | # Methods >> Where
2 |
3 | Returns object(s) from a state object matching a predicate.
4 |
5 | Allows for reading a filtered take from the state object.
6 |
7 | ### Params
8 |
9 | | Name | Attribute |
10 | | ---- | -------------------------------------------------------- |
11 | | key | Key in string form. Used as the name of the state object |
12 | | predicate | The Predicate by which the objects are filtered |
13 |
14 |
15 | ### Returns
16 |
17 | A promise which resolves to the read result of the object: `{any}`
18 |
19 | ### Usage
20 |
21 | ```js copy
22 | import { where } from '@stoxy/core';
23 |
24 | // Find products with price below 5
25 | where("shoppingcart", product => product.price <= 5);
26 | ```
27 |
28 |
--------------------------------------------------------------------------------
/docs/docs/docs/methods/write.md:
--------------------------------------------------------------------------------
1 | # Methods >> Write
2 |
3 | Write the state object by key
4 |
5 | Writes onto the state object given a key and a value
6 |
7 | ### Params
8 |
9 | | Name | Attribute |
10 | | ----- | -------------------------------------------------------- |
11 | | key | Key in string form. Used as the name of the state object |
12 | | value | State object value |
13 |
14 |
15 | ### Returns
16 |
17 | A promise which resolves to the write result of the object: `{key: string, value: any}`
18 |
19 | ### Usage
20 |
21 | ```js copy
22 | import { write } from '@stoxy/core';
23 |
24 | write("counter", 0);
25 | ```
26 |
27 | ---
28 |
29 | ```js copy
30 | import { write } from '@stoxy/core';
31 |
32 | write("Shoppingcart", [{id: 123, name: "Free gift"}]);
33 | ```
34 |
35 | #### Specific write
36 |
37 | You can also write a property of a state object just as easily as you would the whole state object
38 |
39 | This is exteremely handy when you don't need to update the whole state object at the same time.
40 |
41 | With a state object like
42 |
43 | ```json copy
44 | const userData = {
45 | userName: "Stoxy",
46 | shoppingCart: [
47 | { id: 123, name: "Flaming hot cheetos" }
48 | ],
49 | shoppingHistory: {
50 | latestProducts: [
51 | { id: 555, name: "Doritos" },
52 | { id: 958, name: "Pringles" }
53 | ]
54 | }
55 | };
56 | ```
57 |
58 | One could rewrite the userName with
59 |
60 |
61 | ```js copy
62 | import { write } from '@stoxy/core';
63 |
64 | write("userData.userName", "Foobar");
65 | ```
66 |
--------------------------------------------------------------------------------
/docs/docs/docs/mixins/index.md:
--------------------------------------------------------------------------------
1 | # Mixins || 10
2 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/counter.md:
--------------------------------------------------------------------------------
1 | # Examples >> Counter
2 |
3 | A simple counter application, where a button can be used to increment and another can be used to decrement
4 | would be extremely simple with Stoxy.
5 |
6 | Given the HTML
7 |
8 | ```html copy
9 |
10 | -
11 |
12 | counter
13 |
14 | +
15 |
16 | ```
17 |
18 | One would only need to add the following javascript to create a functional counter app
19 |
20 | ```js copy
21 | import '@stoxy/string';
22 | import { write, update } from '@stoxy/core';
23 |
24 | write('counter', 0);
25 |
26 | document.querySelector('#dec').addEventListener('click', () => {
27 | update('counter', count => (count -= 1));
28 | });
29 |
30 | document.querySelector('#inc').addEventListener('click', () => {
31 | update('counter', counter => (counter += 1));
32 | });
33 | ```
34 |
35 | Or with LitHTML, this could be done even simpler, without anything in the html and just some javascript
36 |
37 | ```js copy
38 | import '@stoxy/string';
39 | import { write, update } from '@stoxy/core';
40 | import { html, render } from 'lit-html';
41 |
42 | write('counter', 0);
43 | render(
44 | html`
45 |
46 | update('counter', c => (c -= 1))} id="dec">
47 | -
48 |
49 |
50 | counter
51 |
52 | update('counter', c => (c += 1))} id="inc">
53 | +
54 |
55 |
56 | `,
57 | document.body,
58 | );
59 | ```
60 |
61 |
67 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/hooks.md:
--------------------------------------------------------------------------------
1 | # Examples >> Hooks
2 |
3 | Below is a small example of how to utilize the Hooks in a Preact application
4 |
5 |
11 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/html-element-mixin.md:
--------------------------------------------------------------------------------
1 | # Examples >> Element Mixin HTML
2 |
3 | Below is a lightweight example of how to utilize the Element Mixin in a vanilla HTMLElement web component application.
4 |
5 | You can also find the code in [The github repo](https://github.com/stoxy-js/stoxy-element-mixin/tree/main/examples/html-element-demo)
6 |
7 | The example below uses no other library than Stoxy to provide the reactive experience.
8 |
9 |
15 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/index.md:
--------------------------------------------------------------------------------
1 | # Examples
2 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/lit-element-mixin.md:
--------------------------------------------------------------------------------
1 | # Examples >> Element Mixin LitElement
2 |
3 | Below is a lightweight example of how to utilize the Element Mixin in a LitElement web component application.
4 |
5 | You can also find the code in [The github repo](https://github.com/stoxy-js/stoxy-element-mixin/tree/main/examples/lit-element-demo)
6 |
7 |
13 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/todo.md:
--------------------------------------------------------------------------------
1 | # Examples >> Todo App
2 |
3 | You can find a example of a Todo app in the Codesandbox below.
4 |
5 | You can also find the code in [The github repo](https://github.com/Matsuuu/stoxy/tree/main/examples/todo-app)
6 |
7 | - **TodoApp** class contains the view files and an example of Subscribing to updates
8 | - **TodoAdder** class contains an example of adding todo tasks via the stoxy-form element
9 | - **TodoEntry** class contains examples of modifying the todos state array with sorting and deletion
10 |
11 |
12 |
18 |
--------------------------------------------------------------------------------
/docs/docs/guides/examples/user-list.md:
--------------------------------------------------------------------------------
1 | # Examples >> User Listing
2 |
3 | You can find a example of a User listing app in the Codesandbox below.
4 |
5 | The application provides functionality for adding and removing users, and sorting them by their properties.
6 |
7 | You can also find the code in [The github repo](https://github.com/Matsuuu/stoxy/tree/main/examples/user-list)
8 |
9 | The example below uses no other library than Stoxy to provide the reactive experience.
10 |
11 |
17 |
--------------------------------------------------------------------------------
/docs/docs/guides/getting-started/core-functionality.md:
--------------------------------------------------------------------------------
1 | # Getting started >> Core functionality
2 |
3 | Stoxy is a dynamic state management system, which allows the developer to handle state across the whole
4 | application without hassle.
5 |
6 | Stoxy utilizes the [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) to persist
7 | data across page reloads and navigation. The usage of IDB also means that state persisted onto it is accessible
8 | even when the user is offline.
9 |
10 | ## Persistance
11 |
12 | By default Stoxy doesn't persist anything onto the IndexedDB. When the developer decides that they want to
13 | persist a certain cache key onto the indexedDB, they can do so by declaring it via the Stoxy API
14 |
15 | ```js copy
16 | import { persistKey } from '@stoxy/core';
17 |
18 | persistKey('shoppingcart');
19 | ```
20 |
21 | ## Updates
22 |
23 | Stoxy elements are a perfect tool for creating reactive web experiences. When using Stoxy elements, the developer
24 | doesn't need to worry about reacting to state changes. The elements handle their state and updates to said state
25 | automatically, without any input from the developer.
26 |
27 | The updates are ran in a dynamic fashion, and only the content that has updated will be changed.
28 |
29 | With elements like [Stoxy Repeat](https://stoxy.dev/docs/components/stoxy-repeat), the iterable stateobject are
30 | compared to their old state, and sorted automatically to match the new order of the
31 | state array. Only the items in the wrong order are moved around the DOM, and the ones that didn't change order
32 | will be kept untouched.
33 |
34 | ## Reactivity
35 |
36 | On top of the reactivity provided by the Stoxy elements, the developer can also subscribe to the
37 | state updates happening around their web application.
38 |
39 | The developer is able to set a callback function to be called with the new data set onto the state, as the
40 | state updates. This allows for reactive programming patterns to be done by the developer even without using
41 | Stoxy elements.
42 |
43 | ```js copy
44 | import {sub} from "@stoxy/core";
45 |
46 | sub("shoppingcart", () => console.log("Shopping card updated"));
47 | ```
48 |
--------------------------------------------------------------------------------
/docs/docs/guides/getting-started/index.md:
--------------------------------------------------------------------------------
1 | # Getting started
2 |
--------------------------------------------------------------------------------
/docs/docs/guides/getting-started/installation.md:
--------------------------------------------------------------------------------
1 | # Getting started >> Installation
2 |
3 | Stoxy can be installed as single packages or as a collection of all Stoxy elements and the core.
4 |
5 | To install the whole Stoxy project in one go, you can do so with
6 |
7 | ```bash copy
8 | npm install @stoxy/stoxy
9 | ```
10 |
11 | ---
12 |
13 | Alternatively the packages can be installed as standalone installations
14 |
15 |
16 | ## Stoxy core
17 |
18 | THe functionality and core functions of Stoxy
19 |
20 | ```bash copy
21 | npm install @stoxy/core
22 | ```
23 |
24 | ## Stoxy String
25 |
26 | The **stoxy string** element
27 |
28 | ```bash copy
29 | npm install @stoxy/string
30 | ```
31 |
32 | ## Stoxy object
33 |
34 | The **stoxy object** element
35 |
36 | ```bash copy
37 | npm install @stoxy/object
38 | ```
39 |
40 | ## Stoxy repeat
41 |
42 | The **stoxy repeat** element
43 |
44 | ```bash copy
45 | npm install @stoxy/repeat
46 | ```
47 |
48 | ## Stoxy form
49 |
50 | The **stoxy form** element
51 |
52 | ```bash copy
53 | npm install @stoxy/form
54 | ```
55 |
--------------------------------------------------------------------------------
/docs/docs/guides/index.md:
--------------------------------------------------------------------------------
1 | # Guides
2 |
3 | In the guides section you can find multiple examples of utilizing Stoxy and Stoxy Elements
4 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/index.md:
--------------------------------------------------------------------------------
1 | # Recipes
2 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/persisting-data.md:
--------------------------------------------------------------------------------
1 | # Recipes >> Persisting data
2 |
3 | Persisting data means that the state persists through page reloads and even
4 | navigation outside of the page.
5 |
6 | There are plenty of situtations where you might want to persist data. One example
7 | would be persisting API data that doesn't update often, or implementing a **Stale-While-Revalidate**
8 | state management system
9 |
10 | Persisting data to IndexedDB isn't on by default, and needs to be opted in on a per-key basis.
11 |
12 | After declaring the key with `persistKey` all the state of that key is persisted into the IndexedDB.
13 |
14 | ```js copy
15 | import { persistKey } from "@stoxy/core";
16 |
17 | persistKey("shoppingcart", "userhistory");
18 | ```
19 |
20 | ## Memory management
21 |
22 | Persisting data onto the IndexedDB could also have a performance benefit. When persisting data, the Stoxy
23 | system only keeps the latest 5 cache objects in memory cache, and let's the garbage collection handle older
24 | state objects.
25 |
26 | This means that for an application using a large amount of state keys, it might be beneficial to persist the data
27 | to enable the memory management benefits.
28 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/reading-data.md:
--------------------------------------------------------------------------------
1 | # Recipes >> Reading data
2 |
3 | Reading data from the Stoxy storage is done through a promise-based system. State data lookup is fast and
4 | can be done from any part of the application.
5 |
6 | If the data is being persisted onto the IndexedDB, the last 5 persisted cache keys are stored onto the in memory cache
7 | for faster lookup.
8 |
9 | ```js copy
10 | import { read } from "@stoxy/core";
11 |
12 | async function getUserData() {
13 | return await read("userData");
14 | }
15 |
16 | ```
17 |
18 | ---
19 |
20 | ```js copy
21 | import { read } from "@stoxy/core";
22 |
23 | read("userData").then(userData => {
24 | console.log("Logged in as " + userData.name);
25 | });
26 | ```
27 |
28 | #### Specific read
29 |
30 | You can also read a property of a state object just as easily as you would the whole state object
31 |
32 | This is exteremely handy when you don't need the whole state object at the same time.
33 |
34 | With a state object like
35 |
36 | ```json copy
37 | const userData = {
38 | userName: "Stoxy",
39 | shoppingCart: [
40 | { id: 123, name: "Flaming hot cheetos" }
41 | ],
42 | shoppingHistory: {
43 | latestProducts: [
44 | { id: 555, name: "Doritos" },
45 | { id: 958, name: "Pringles" }
46 | ]
47 | }
48 | };
49 | ```
50 |
51 | One could access the latest products in the shoppinghistory of the user with
52 |
53 |
54 | ```js copy
55 | import { read } from '@stoxy/core';
56 |
57 | read("userData.shoppingHistory.latestProducts").then(latestHistoryProducts => {
58 | latestHistoryProducts.map(item => console.log(item));
59 | });
60 | ```
61 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/removing-data.md:
--------------------------------------------------------------------------------
1 | # Recipes >> Removing data
2 |
3 | In some cases you might want to remove data from the state objects. There are a few ways to remove data from
4 | state.
5 |
6 |
7 | ## Overwriting data
8 |
9 | The first method of removing data is by just overwriting the data with new data.
10 |
11 | ```js copy
12 | import { read, write } from "@stoxy/core";
13 |
14 | const shoppingCart = await read("shoppingcart");
15 | // Filter only items that are prices under 10
16 | shoppingCart = shoppingCart.filter(item => item.price < 10);
17 |
18 | write("shoppingcart", shoppingCart);
19 | ```
20 |
21 |
22 | ## Removing by predicate
23 |
24 | Another method is using the `remove` function of the Stoxy API
25 |
26 | ```js copy
27 | import { remove } from "@stoxy/core";
28 |
29 | // Remove items prices above 10
30 | remove("shoppingcart", item => item.price > 10);
31 | ```
32 |
33 | This is a nice and fast way to remove objects from state without having to manually read the state
34 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/subscribing-to-updates.md:
--------------------------------------------------------------------------------
1 | # Recipes >> Subscribing to updates
2 |
3 | Subscribing to a key allows the developer to handle state updates programmatically in any way desired.
4 |
5 | ```js copy
6 | import { sub } from '@stoxy/core';
7 |
8 | sub("shoppingcart", updateItemCount);
9 |
10 | function updateItemCount(e) {
11 | write("itemcount", e.data.length);
12 | }
13 | ```
14 |
15 | ### Unsubscribing
16 |
17 | As Stoxy utilizes event listeners in it's subscribing, it's good manner to clean up
18 | after the subscription is no more needed.
19 |
20 | The sub function returns a callable function which when called, removes the set event listeners.
21 |
22 | ```js copy
23 | import { sub } from '@stoxy/core';
24 |
25 | const unsub = sub("onlyone", updateOnlyOnce);
26 |
27 | function updateOnlyOnce() {
28 | // Do something
29 | unsub();
30 | }
31 | ```
32 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/updating-data.md:
--------------------------------------------------------------------------------
1 | # Recipes >> Updating data
2 |
3 | In some cases you might want to update data from the state objects. There are a few ways to update data from
4 | state.
5 |
6 | ## Overwriting data
7 |
8 | The first method of updating data is by just overwriting the data with new data.
9 |
10 | ```js copy
11 | import { read, write } from '@stoxy/core';
12 |
13 | const shoppingCart = await read('shoppingcart');
14 | shoppingCart.push({ id: 123, name: 'Cheetos' });
15 |
16 | write('shoppingcart', shoppingCart);
17 | ```
18 |
19 | ## Updating with a delegate
20 |
21 | Another method is using the `update` function of the Stoxy API
22 |
23 | ```js copy
24 | import { update } from '@stoxy/core';
25 |
26 | update('counter', counter => counter += 1);
27 | ```
28 |
29 | This is a nice and fast way to update objects from state without having to manually read the state
30 |
31 | #### Specific update
32 |
33 | You can also update a property of a state object just as easily as you would the whole state object
34 |
35 | This is exteremely handy when you don't need to update the whole state object at the same time.
36 |
37 | With a state object like
38 |
39 | ```json copy
40 | const userData = {
41 | userName: "Stoxy",
42 | customerPoints: 5,
43 | shoppingCart: [
44 | { id: 123, name: "Flaming hot cheetos" }
45 | ],
46 | shoppingHistory: {
47 | latestProducts: [
48 | { id: 555, name: "Doritos" },
49 | { id: 958, name: "Pringles" }
50 | ]
51 | }
52 | };
53 | ```
54 |
55 | One could update the customerPoints with one of the following ways
56 |
57 | ```js copy
58 | import { update } from '@stoxy/core';
59 |
60 | update('userData.customerPoints', points => (points += 100));
61 |
62 | // Or
63 |
64 | update('userData', userData => {
65 | userData.customerPoints += 100;
66 | return userData;
67 | });
68 | ```
69 |
70 | The latter way is more versatile in that you could run a larger update in the same delegate
71 |
72 | ```js copy
73 | update("userData", userData => {
74 | userData.customerPoints += 100;
75 | userData.userName = "foobar";
76 | return userData;
77 | });
78 | ```
79 |
--------------------------------------------------------------------------------
/docs/docs/guides/recipes/writing-data.md:
--------------------------------------------------------------------------------
1 | # Recipes >> Writing data
2 |
3 | Writing data to the Stoxy storage is done through a promise-based system. Writing data into state can be done from
4 | anywhere in the web application
5 |
6 | If the data is being persisted onto the IndexedDB, the last 5 persisted cache keys are stored onto the in memory cache
7 | for faster lookup.
8 |
9 | ```js copy
10 | import { write } from "@stoxy/core";
11 |
12 | const userData = { id: 123, name: "Matsuuu" };
13 | write("userData", userData);
14 |
15 | ```
16 |
17 |
18 | If the state object is to be persisted through page reloads, the developer needs to declare it at
19 | some point before writing into the state.
20 |
21 | The persistKey call needs to be only made once per key.
22 |
23 | ```js copy
24 | import { write, persistKey } from "@stoxy/core";
25 |
26 | persistKey("userData");
27 |
28 | const userData = { id: 123, name: "Matsuuu" };
29 | write("userData", userData);
30 |
31 | ```
32 |
33 | #### Specific write
34 |
35 | You can also write a property of a state object just as easily as you would the whole state object
36 |
37 | This is exteremely handy when you don't need to update the whole state object at the same time.
38 |
39 | With a state object like
40 |
41 | ```json copy
42 | const userData = {
43 | userName: "Stoxy",
44 | shoppingCart: [
45 | { id: 123, name: "Flaming hot cheetos" }
46 | ],
47 | shoppingHistory: {
48 | latestProducts: [
49 | { id: 555, name: "Doritos" },
50 | { id: 958, name: "Pringles" }
51 | ]
52 | }
53 | };
54 | ```
55 |
56 | One could rewrite the userName with
57 |
58 |
59 | ```js copy
60 | import { write } from '@stoxy/core';
61 |
62 | write("userData.userName", "Foobar");
63 | ```
64 |
--------------------------------------------------------------------------------
/docs/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Stoxy
3 | layout: layout-home
4 | slogan: The reactive state management system for all modern Web Technologies
5 | callToActionItems:
6 | - text: Follow Guides
7 | href: /guides/
8 | - text: Browse Docs
9 | href: /docs/
10 | reasonHeader: Why Stoxy?
11 | reasons:
12 | - header: Small
13 | text: No dependencies and no need for build tools.
14 | - header: Global state
15 | text: Handle state across the whole application, with immediate response from components.
16 | - header: Zero Configuration
17 | text: With plug and play implementation, you're up and running in just a single line of code.
18 | - header: Extensive tooling
19 | text: Stoxy ships with framework agnostic components to use with the state management system to achieve optimal results with your Web Application.
20 | - header: Extendability
21 | text: Built with small and powerful functions, allowing you to extend the functionality with predicates and delegates.
22 | - header: Offline-ready
23 | text: Stoxy can utilize the IndexedDB for storage, allowing you to create offline-first experiences without the hassle.
24 | ---
25 |
26 | ---
27 |
28 |
29 |
Stoxy in Action
30 |
31 |
32 |
38 |
--------------------------------------------------------------------------------
/docs/docs/sitemap.njk:
--------------------------------------------------------------------------------
1 | ---
2 | layout: layout-raw
3 | permalink: /sitemap.xml
4 | eleventyExcludeFromCollections: true
5 | ---
6 |
7 |
8 | {% for page in collections.all %}
9 |
10 | {{ rocketConfig.absoluteBaseUrl }}{{ page.url | url }}
11 | {{ page.date.toISOString() }}
12 | {{ page.data.changeFreq if page.data.changeFreq else "monthly" }}
13 |
14 | {% endfor %}
15 |
16 |
--------------------------------------------------------------------------------
/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "docs",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "rocket start",
8 | "build": "rocket build"
9 | },
10 | "keywords": [],
11 | "author": "",
12 | "license": "ISC",
13 | "devDependencies": {
14 | "@rocket/cli": "^0.6.0",
15 | "@rocket/launch": "^0.4.0"
16 | },
17 | "dependencies": {
18 | "@rocket/blog": "^0.3.0",
19 | "@rocket/search": "^0.3.1"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/docs/rocket.config.mjs:
--------------------------------------------------------------------------------
1 | import { rocketLaunch } from '@rocket/launch';
2 | import { rocketBlog } from '@rocket/blog';
3 | import { rocketSearch } from '@rocket/search';
4 | import { adjustPluginOptions } from 'plugins-manager';
5 |
6 | /** @type {Partial} */
7 | const config = {
8 | setupEleventyComputedConfig: [
9 | adjustPluginOptions('socialMediaImage', {
10 | createSocialImageSvg: async ({ title = '', subTitle = '', subTitle2 = '', footer = '', logo = '' }) => {
11 | let svgStr = `
12 |
13 |
14 |
15 |
16 | ${logo}
17 |
26 | ${title || 'Stoxy'}
27 | ${
28 | title
29 | ? `
30 |
31 | in Stoxy docs
32 |
33 | `
34 | : `
35 |
36 | The reactive state management system
37 |
38 |
39 | equipped with Web Components
40 |
41 | `
42 | }
43 |
44 |
45 | `;
46 | return svgStr;
47 | },
48 | }),
49 | ],
50 | };
51 |
52 | config.presets = [rocketLaunch(), rocketBlog(), rocketSearch()];
53 | config.absoluteBaseUrl = "https://stoxy-js.github.io/stoxy/";
54 | //config.pathPrefix = "/stoxy/";
55 | //config.urlPath = "/stoxy/";
56 |
57 | export default config;
58 |
--------------------------------------------------------------------------------
/examples/reference-values/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/examples/reference-values/index.js:
--------------------------------------------------------------------------------
1 | import { write, update, read, add, remove } from "@stoxy/core";
2 |
3 |
4 | // Write
5 | /*
6 | const objectValue = {
7 | foo: "Foo",
8 | bar: "Bar",
9 | bin: {
10 | biz: {
11 | zzz: "BRRR"
12 | },
13 | boo: [
14 | "ffff",
15 | "bbbb",
16 | "aaaa"
17 | ],
18 | gogo: {
19 | gugu: [
20 | { name: "john" },
21 | { name: "matt" }
22 | ]
23 | }
24 | }
25 | }
26 |
27 | const stringValue = "Foobar";
28 | const intValue = 100;
29 |
30 |
31 | write("objectValue", objectValue);
32 | write("stringValue", stringValue);
33 | write("intValue", intValue);
34 |
35 | console.log("Assigning new value");
36 | objectValue.foo = "FOFOFO";
37 | objectValue.bin.biz.zzz = "KKGGGMM";
38 | objectValue.bin.boo[1] = "XXXX";
39 | objectValue.bin.gogo.gugu[0].name = "Matsu";
40 |
41 | setTimeout(() => {
42 | console.log(JSON.stringify(window._STOXY_STATE_CACHE.objectValue, null, 4));
43 | console.log(JSON.stringify(objectValue, null, 4));
44 | }, 100)
45 | */
46 |
47 | // Update
48 | /*
49 | const objectValue = {
50 | foo: "bar",
51 | bin: {
52 | boo: "Boo"
53 | }
54 | };
55 | write("objectValue", objectValue);
56 |
57 | read("objectValue").then(async res => {
58 |
59 | console.log("Before: ", res.bin.boo);
60 | await update("objectValue.bin.boo", () => "Baa")
61 | console.log("after: ", res.bin.boo);
62 | });
63 | */
64 |
65 | const objectValue = [
66 | { name: "Foo" },
67 | { name: "Bar" },
68 | { name: "Baz" }
69 | ];
70 | write("objectValue", objectValue);
71 |
72 | read("objectValue").then(async res => {
73 |
74 | console.log("Before: ", res);
75 | await remove("objectValue", item => item.name === "Bar")
76 | console.log("after: ", res);
77 | console.log("State: ", window._STOXY_STATE_CACHE.objectValue);
78 | });
79 |
80 |
81 | /*
82 | const arrayValue = [
83 | "Foo",
84 | "Bar",
85 | "Baz"
86 | ]
87 | write("arrayValue", arrayValue);
88 |
89 | read("arrayValue").then(async res => {
90 |
91 | console.log("Before: ", res);
92 | await add("arrayValue", "ZULU")
93 | console.log("after: ", res);
94 | console.log("State: ", window._STOXY_STATE_CACHE.arrayValue);
95 | });
96 | */
97 |
--------------------------------------------------------------------------------
/examples/reference-values/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "race-conditioning",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "web-dev-server --watch --node-resolve"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "@stoxy/core": "file:../../lib/core"
14 | },
15 | "devDependencies": {
16 | "@web/dev-server": "^0.1.11"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/examples/todo-app/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # editorconfig.org
4 |
5 | root = true
6 |
7 |
8 | [*]
9 |
10 | # Change these settings to your own preference
11 | indent_style = space
12 | indent_size = 2
13 |
14 | # We recommend you to keep these unchanged
15 | end_of_line = lf
16 | charset = utf-8
17 | trim_trailing_whitespace = true
18 | insert_final_newline = true
19 |
20 | [*.md]
21 | trim_trailing_whitespace = false
22 |
23 | [*.json]
24 | indent_size = 2
25 |
26 | [*.{html,js,md}]
27 | block_comment_start = /**
28 | block_comment = *
29 | block_comment_end = */
30 |
--------------------------------------------------------------------------------
/examples/todo-app/.gitignore:
--------------------------------------------------------------------------------
1 | ## editors
2 | /.idea
3 | /.vscode
4 |
5 | ## system files
6 | .DS_Store
7 |
8 | ## npm
9 | /node_modules/
10 | /npm-debug.log
11 |
12 | ## testing
13 | /coverage/
14 |
15 | ## temp folders
16 | /.tmp/
17 |
18 | # build
19 | /_site/
20 | /dist/
21 | /out-tsc/
22 |
23 | storybook-static
--------------------------------------------------------------------------------
/examples/todo-app/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 todo-app
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/examples/todo-app/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ## Open-wc Starter App
6 |
7 | [](https://github.com/open-wc)
8 |
9 | ## Quickstart
10 |
11 | To get started:
12 |
13 | ```bash
14 | npm init @open-wc
15 | # requires node 10 & npm 6 or higher
16 | ```
17 |
18 | ## Scripts
19 |
20 | - `start` runs your app for development, reloading on file changes
21 | - `start:build` runs your app after it has been built using the build command
22 | - `build` builds your app and outputs it in your `dist` directory
23 | - `test` runs your test suite with Web Test Runner
24 | - `lint` runs the linter for your project
25 |
26 | ## Tooling configs
27 |
28 | For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
29 |
30 | If you customize the configuration a lot, you can consider moving them to individual files.
--------------------------------------------------------------------------------
/examples/todo-app/custom-elements.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "tags": [
4 | {
5 | "name": "todo-app",
6 | "description": "An application with a title and an action counter",
7 | "properties": [
8 | {
9 | "name": "title",
10 | "type": "String",
11 | "description": "The title of your application",
12 | "default": "Hey there"
13 | },
14 | {
15 | "name": "page",
16 | "type": "String",
17 | "description": "Which page to show",
18 | "default": "main"
19 | }
20 | ],
21 | "events": [],
22 | "slots": [],
23 | "cssProperties": []
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/examples/todo-app/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
19 | todo-app
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/examples/todo-app/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es6",
5 | "checkJs": true
6 | },
7 | "exclude": ["node_modules"]
8 | }
9 |
--------------------------------------------------------------------------------
/examples/todo-app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "@open-wc/eslint-config": "^4.2.0",
4 | "@web/dev-server": "^0.1.1",
5 | "husky": "^1.0.0",
6 | "lint-staged": "^10.0.0",
7 | "prettier": "^2.0.4"
8 | },
9 | "scripts": {
10 | "lint": "eslint --ext .js,.html . --ignore-path .gitignore && prettier \"**/*.js\" --check --ignore-path .gitignore",
11 | "format": "eslint --ext .js,.html . --fix --ignore-path .gitignore && prettier \"**/*.js\" --write --ignore-path .gitignore",
12 | "start": "web-dev-server"
13 | },
14 | "name": "todo-app",
15 | "version": "0.0.0",
16 | "description": "Webcomponent todo-app following open-wc recommendations",
17 | "author": "todo-app",
18 | "license": "MIT",
19 | "dependencies": {
20 | "@stoxy/stoxy": "^0.3.3",
21 | "lit-element": "^2.0.1",
22 | "lit-html": "^1.0.0"
23 | },
24 | "eslintConfig": {
25 | "extends": [
26 | "@open-wc/eslint-config",
27 | "eslint-config-prettier"
28 | ]
29 | },
30 | "prettier": {
31 | "singleQuote": true,
32 | "arrowParens": "avoid"
33 | },
34 | "lint-staged": {
35 | "*.js": [
36 | "eslint --fix",
37 | "prettier --write",
38 | "git add"
39 | ]
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/examples/todo-app/src/TodoAdder.js:
--------------------------------------------------------------------------------
1 | import { LitElement, html, css } from 'lit-element';
2 | import '@stoxy/form';
3 |
4 | export default class TodoAdder extends LitElement {
5 | render() {
6 | return html`
7 | {
11 | this.shadowRoot.querySelector('input').value = '';
12 | }}
13 | >
14 |
20 |
21 |
22 | `;
23 | }
24 |
25 | static get styles() {
26 | return css`
27 | input[type='text'] {
28 | background: transparent;
29 | font-size: 24px;
30 | color: #fff;
31 | border: 2px solid #fff;
32 | }
33 | input[type='submit'] {
34 | font-size: 24px;
35 | font-weight: bold;
36 | color: #fff;
37 | background: transparent;
38 | border: 4px solid #fff;
39 | cursor: pointer;
40 | }
41 |
42 | input::placeholder,
43 | input::-webkit-input-placeholder {
44 | color: #fff;
45 | }
46 | `;
47 | }
48 | }
49 |
50 | if (!customElements.get('todo-adder')) {
51 | customElements.define('todo-adder', TodoAdder);
52 | }
53 |
--------------------------------------------------------------------------------
/examples/todo-app/src/TodoApp.js:
--------------------------------------------------------------------------------
1 | import { LitElement, html, css } from "lit-element";
2 | import './TodoAdder';
3 | import './TodoEntry';
4 | import '@stoxy/repeat';
5 | import '@stoxy/string';
6 | import { persistKey, sub, write, add, update, clear } from "@stoxy/core";
7 |
8 | export default class TodoApp extends LitElement {
9 | static get properties() {
10 | return {
11 | todos: {
12 | type: Array,
13 | },
14 | };
15 | }
16 |
17 | constructor() {
18 | super();
19 | persistKey('todos', 'todocount');
20 | }
21 |
22 | firstUpdated() {
23 | write('counter', 0);
24 | write('foo.bar', "bar");
25 | write('foo.bin', "bin");
26 | setInterval(() => {
27 | update('counter', counter => (counter += 1));
28 | }, 1000);
29 | sub('todos', this.todosChangeCallback.bind(this));
30 |
31 | }
32 |
33 | todosChangeCallback(e) {
34 | write('todocount', e && e.data ? e.data.length : 0);
35 | }
36 |
37 | static get styles() {
38 | return css`
39 | :host {
40 | width: 100%;
41 | height: 100vh;
42 | background: lightseagreen;
43 | display: flex;
44 | flex-direction: column;
45 | color: #fff;
46 | align-items: center;
47 | padding-top: 2rem;
48 | }
49 | todo-adder {
50 | margin-bottom: 2rem;
51 | }
52 | stoxy-repeat {
53 | width: 35%;
54 | }
55 | `;
56 | }
57 |
58 | render() {
59 | return html`
60 | counter
61 | My Todo app
62 | clear('todos')}>Clear list
63 |
64 |
65 |
66 |
67 |
68 | Task Count: todocount
69 | `;
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/examples/todo-app/src/todo-app.js:
--------------------------------------------------------------------------------
1 | import TodoApp from './TodoApp.js';
2 |
3 | customElements.define('todo-app', TodoApp);
4 |
--------------------------------------------------------------------------------
/examples/todo-app/web-dev-server.config.mjs:
--------------------------------------------------------------------------------
1 | // import { hmrPlugin, presets } from '@open-wc/dev-server-hmr';
2 |
3 | /** Use Hot Module replacement by adding --hmr to the start command */
4 | const hmr = process.argv.includes('--hmr');
5 |
6 | export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
7 | nodeResolve: true,
8 | open: '/',
9 | watch: !hmr,
10 |
11 | /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */
12 | // esbuildTarget: 'auto'
13 |
14 | /** Set appIndex to enable SPA routing */
15 | // appIndex: 'demo/index.html',
16 |
17 | /** Confgure bare import resolve plugin */
18 | // nodeResolve: {
19 | // exportConditions: ['browser', 'development']
20 | // },
21 |
22 | plugins: [
23 | /** Use Hot Module Replacement by uncommenting. Requires @open-wc/dev-server-hmr plugin */
24 | // hmr && hmrPlugin({ exclude: ['**/*/node_modules/**/*'], presets: [presets.litElement] }),
25 | ],
26 |
27 | // See documentation for all available options
28 | });
29 |
--------------------------------------------------------------------------------
/examples/ts-test/index.ts:
--------------------------------------------------------------------------------
1 | import { read, sub } from "@stoxy/core";
2 |
3 | async function readValue() {
4 | const val = await read("KEY");
5 |
6 | sub("KEY", (e) => {
7 | })
8 | }
9 |
--------------------------------------------------------------------------------
/examples/ts-test/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ts-test",
3 | "version": "1.0.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "ts-test",
9 | "version": "1.0.0",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@stoxy/core": "file:../../lib/core"
13 | }
14 | },
15 | "../../lib/core": {
16 | "version": "0.4.12",
17 | "license": "ISC"
18 | },
19 | "node_modules/@stoxy/core": {
20 | "resolved": "../../lib/core",
21 | "link": true
22 | }
23 | },
24 | "dependencies": {
25 | "@stoxy/core": {
26 | "version": "file:../../lib/core"
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/ts-test/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ts-test",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "@stoxy/core": "file:../../lib/core"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | export { openStorage, read, write, clear, sub, add, remove, persistKey, update } from '@stoxy/core';
2 |
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "esnext",
4 | "target": "esnext",
5 | "checkJs": true,
6 | "moduleResolution": "node"
7 | },
8 | "exclude": ["node_modules"]
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/lib/core/README.md:
--------------------------------------------------------------------------------
1 | # Stoxy Core
2 |
3 | Stoxy Core is a part of the Stoxy suite of libraries. For more information go see the [Stoxy Documentation](https://stoxy.dev/)
4 |
--------------------------------------------------------------------------------
/lib/core/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/core",
3 | "version": "0.5.0",
4 | "description": "The reactive state management system equipped with Web Components.",
5 | "main": "stoxy.js",
6 | "scripts": {},
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/stoxy-js/stoxy"
10 | },
11 | "author": "Matsuuu (https://matsu.fi/)",
12 | "license": "ISC",
13 | "types": "index.d.ts"
14 | }
15 |
--------------------------------------------------------------------------------
/lib/core/stoxy-events.js:
--------------------------------------------------------------------------------
1 | export const INIT_SUCCESS = 'stoxy-init-success';
2 | export const PUT_SUCCESS = 'stoxy-put-success';
3 | export const READ_SUCCESS = 'stoxy-read-success';
4 | export const DELETE_SUCCESS = 'stoxy-delete-success';
5 |
--------------------------------------------------------------------------------
/lib/core/stoxy.js:
--------------------------------------------------------------------------------
1 | export { openStorage, read, write, clear, sub, add, remove, persistKey, update, where } from './stoxy-storage.js';
2 | export { INIT_SUCCESS, PUT_SUCCESS, READ_SUCCESS, DELETE_SUCCESS } from "./stoxy-events.js"
3 |
--------------------------------------------------------------------------------
/lib/element-base/README.md:
--------------------------------------------------------------------------------
1 | # Stoxy Element Base
2 |
3 | Stoxy Element Base is a part of the Stoxy suite of libraries. For more information go see the [Stoxy Documentation](https://stoxy.dev/)
4 |
--------------------------------------------------------------------------------
/lib/element-base/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/element-base",
3 | "version": "0.3.0-test-1",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "@stoxy/element-base",
9 | "version": "0.3.0-test-1",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@stoxy/core": "^0.3.0"
13 | }
14 | },
15 | "node_modules/@stoxy/core": {
16 | "version": "0.3.0",
17 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.3.0.tgz",
18 | "integrity": "sha512-citml0KFZJHOFDOjT2rLh4f49d22rISyE4i2AW8wurMSlMvv/MdcNxSd24ihKlbUvt2Lb2e8MqctKrWi8K6SLw=="
19 | }
20 | },
21 | "dependencies": {
22 | "@stoxy/core": {
23 | "version": "0.3.0",
24 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.3.0.tgz",
25 | "integrity": "sha512-citml0KFZJHOFDOjT2rLh4f49d22rISyE4i2AW8wurMSlMvv/MdcNxSd24ihKlbUvt2Lb2e8MqctKrWi8K6SLw=="
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/element-base/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/element-base",
3 | "version": "0.4.0",
4 | "description": "The reactive state management system for all modern Web Technologies",
5 | "main": "stoxy-element.js",
6 | "scripts": {},
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/stoxy-js/stoxy"
10 | },
11 | "author": "Matsuuu (https://matsu.fi/)",
12 | "license": "ISC",
13 | "types": "index.d.ts",
14 | "dependencies": {
15 | "@stoxy/core": "^0.4.3"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/form/README.md:
--------------------------------------------------------------------------------
1 | # Stoxy Form
2 |
3 | Stoxy Form is a part of the Stoxy suite of libraries. For more information go see the [Stoxy Documentation](https://stoxy.dev/)
4 |
--------------------------------------------------------------------------------
/lib/form/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/form",
3 | "version": "0.4.0",
4 | "description": "The reactive state management system for all modern Web Technologies",
5 | "main": "stoxy-form.js",
6 | "scripts": {},
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/stoxy-js/stoxy"
10 | },
11 | "author": "Matsuuu (https://matsu.fi/)",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@stoxy/core": "^0.4.3"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/object/README.md:
--------------------------------------------------------------------------------
1 | # Stoxy Object
2 |
3 | Stoxy Object is a part of the Stoxy suite of libraries. For more information go see the [Stoxy Documentation](https://stoxy.dev/)
4 |
--------------------------------------------------------------------------------
/lib/object/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/object",
3 | "version": "0.2.6",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "@stoxy/object",
9 | "version": "0.2.6",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@stoxy/core": "^0.2.6",
13 | "@stoxy/element-base": "^0.3.0-test"
14 | }
15 | },
16 | "node_modules/@stoxy/core": {
17 | "version": "0.2.6",
18 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.2.6.tgz",
19 | "integrity": "sha512-BenUVmeQ8YaUCZQFYAVsro8nvFcisZUD9huVd0sZlGQYoIfBBKB2qFjMrt1aQWHPtJVWMPUBHhRMiQCOrRyJFg=="
20 | },
21 | "node_modules/@stoxy/element-base": {
22 | "version": "0.3.0-test",
23 | "resolved": "https://registry.npmjs.org/@stoxy/element-base/-/element-base-0.3.0-test.tgz",
24 | "integrity": "sha512-wld5XXInWC9KoxEZKiBNJ5yIXx0al9CFCzOtiTeLWkOjyDINMiEiPsFhRrRyHiJJ9lC5MOvZiGsLOUXvAz0+qQ=="
25 | }
26 | },
27 | "dependencies": {
28 | "@stoxy/core": {
29 | "version": "0.2.6",
30 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.2.6.tgz",
31 | "integrity": "sha512-BenUVmeQ8YaUCZQFYAVsro8nvFcisZUD9huVd0sZlGQYoIfBBKB2qFjMrt1aQWHPtJVWMPUBHhRMiQCOrRyJFg=="
32 | },
33 | "@stoxy/element-base": {
34 | "version": "0.3.0-test",
35 | "resolved": "https://registry.npmjs.org/@stoxy/element-base/-/element-base-0.3.0-test.tgz",
36 | "integrity": "sha512-wld5XXInWC9KoxEZKiBNJ5yIXx0al9CFCzOtiTeLWkOjyDINMiEiPsFhRrRyHiJJ9lC5MOvZiGsLOUXvAz0+qQ=="
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/object/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/object",
3 | "version": "0.4.0",
4 | "description": "The reactive state management system for all modern Web Technologies",
5 | "main": "stoxy-object.js",
6 | "scripts": {},
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/stoxy-js/stoxy"
10 | },
11 | "author": "Matsuuu (https://matsu.fi/)",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@stoxy/core": "^0.4.3",
15 | "@stoxy/element-base": "^0.4.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/object/stoxy-object.js:
--------------------------------------------------------------------------------
1 | import { read } from '@stoxy/core';
2 | import StoxyElement from '@stoxy/element-base';
3 |
4 | class StoxyObject extends StoxyElement {
5 | constructor() {
6 | super();
7 | }
8 |
9 | stoxyUpdate(data) {
10 | if (!data) {
11 | this._updateContent(this.content);
12 | return;
13 | }
14 | const prefix = this.getAttribute('prefix');
15 | const keys = Object.keys(data);
16 | let newContent = this.content;
17 | keys.map(k => {
18 | const regexKey = prefix + k;
19 | const keyData = data[k];
20 | if (!keyData) return;
21 |
22 | if (typeof keyData === 'object') {
23 | newContent = this._replaceObject(newContent, regexKey, keyData);
24 | } else {
25 | newContent = this._replaceString(newContent, regexKey, keyData);
26 | }
27 | });
28 | this._updateContent(newContent);
29 | this._setReady(true);
30 | }
31 |
32 | async stoxyInit() {
33 | this.key = this.getAttribute('key');
34 | const data = await read(this.key);
35 | this.content = this.innerHTML;
36 | this.stoxyUpdate(data);
37 | this._dispatchUpdatedEvent(data);
38 | }
39 |
40 | static get observedAttributes() {
41 | return ['key', 'prefix'];
42 | }
43 | }
44 |
45 | if (!customElements.get('stoxy-object')) {
46 | customElements.define('stoxy-object', StoxyObject);
47 | }
48 |
--------------------------------------------------------------------------------
/lib/repeat/README.md:
--------------------------------------------------------------------------------
1 | # Stoxy Repeat
2 |
3 | Stoxy Repeat is a part of the Stoxy suite of libraries. For more information go see the [Stoxy Documentation](https://stoxy.dev/)
4 |
--------------------------------------------------------------------------------
/lib/repeat/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/repeat",
3 | "version": "0.3.0-test",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "@stoxy/repeat",
9 | "version": "0.3.0-test",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@stoxy/core": "^0.3.0-test",
13 | "@stoxy/element-base": "^0.3.0-test"
14 | }
15 | },
16 | "node_modules/@stoxy/core": {
17 | "version": "0.3.0-test",
18 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.3.0-test.tgz",
19 | "integrity": "sha512-nuzJffue5Lew0TJ0Bsy1XEvzWs2k40Fj1kjNiKkjipcBUZusVf9Y0ggzabshKrniy/tQcQiiJwbDxZ+oTuQsxg=="
20 | },
21 | "node_modules/@stoxy/element-base": {
22 | "version": "0.3.0-test",
23 | "resolved": "https://registry.npmjs.org/@stoxy/element-base/-/element-base-0.3.0-test.tgz",
24 | "integrity": "sha512-wld5XXInWC9KoxEZKiBNJ5yIXx0al9CFCzOtiTeLWkOjyDINMiEiPsFhRrRyHiJJ9lC5MOvZiGsLOUXvAz0+qQ=="
25 | }
26 | },
27 | "dependencies": {
28 | "@stoxy/core": {
29 | "version": "0.3.0-test",
30 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.3.0-test.tgz",
31 | "integrity": "sha512-nuzJffue5Lew0TJ0Bsy1XEvzWs2k40Fj1kjNiKkjipcBUZusVf9Y0ggzabshKrniy/tQcQiiJwbDxZ+oTuQsxg=="
32 | },
33 | "@stoxy/element-base": {
34 | "version": "0.3.0-test",
35 | "resolved": "https://registry.npmjs.org/@stoxy/element-base/-/element-base-0.3.0-test.tgz",
36 | "integrity": "sha512-wld5XXInWC9KoxEZKiBNJ5yIXx0al9CFCzOtiTeLWkOjyDINMiEiPsFhRrRyHiJJ9lC5MOvZiGsLOUXvAz0+qQ=="
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/repeat/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/repeat",
3 | "version": "0.4.0",
4 | "description": "The reactive state management system for all modern Web Technologies",
5 | "main": "stoxy-repeat.js",
6 | "scripts": {},
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/Matsuuu/stoxy"
10 | },
11 | "author": "Matsuuu (https://matsu.fi/)",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@stoxy/core": "^0.4.3",
15 | "@stoxy/element-base": "^0.4.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/string/README.md:
--------------------------------------------------------------------------------
1 | # Stoxy String
2 |
3 | Stoxy String is a part of the Stoxy suite of libraries. For more information go see the [Stoxy Documentation](https://stoxy.dev/)
4 |
--------------------------------------------------------------------------------
/lib/string/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/string",
3 | "version": "0.3.0-test",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "@stoxy/string",
9 | "version": "0.3.0-test",
10 | "license": "ISC",
11 | "dependencies": {
12 | "@stoxy/core": "^0.3.0-test",
13 | "@stoxy/element-base": "^0.3.0-test"
14 | }
15 | },
16 | "node_modules/@stoxy/core": {
17 | "version": "0.3.0-test",
18 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.3.0-test.tgz",
19 | "integrity": "sha512-nuzJffue5Lew0TJ0Bsy1XEvzWs2k40Fj1kjNiKkjipcBUZusVf9Y0ggzabshKrniy/tQcQiiJwbDxZ+oTuQsxg=="
20 | },
21 | "node_modules/@stoxy/element-base": {
22 | "version": "0.3.0-test",
23 | "resolved": "https://registry.npmjs.org/@stoxy/element-base/-/element-base-0.3.0-test.tgz",
24 | "integrity": "sha512-wld5XXInWC9KoxEZKiBNJ5yIXx0al9CFCzOtiTeLWkOjyDINMiEiPsFhRrRyHiJJ9lC5MOvZiGsLOUXvAz0+qQ=="
25 | }
26 | },
27 | "dependencies": {
28 | "@stoxy/core": {
29 | "version": "0.3.0-test",
30 | "resolved": "https://registry.npmjs.org/@stoxy/core/-/core-0.3.0-test.tgz",
31 | "integrity": "sha512-nuzJffue5Lew0TJ0Bsy1XEvzWs2k40Fj1kjNiKkjipcBUZusVf9Y0ggzabshKrniy/tQcQiiJwbDxZ+oTuQsxg=="
32 | },
33 | "@stoxy/element-base": {
34 | "version": "0.3.0-test",
35 | "resolved": "https://registry.npmjs.org/@stoxy/element-base/-/element-base-0.3.0-test.tgz",
36 | "integrity": "sha512-wld5XXInWC9KoxEZKiBNJ5yIXx0al9CFCzOtiTeLWkOjyDINMiEiPsFhRrRyHiJJ9lC5MOvZiGsLOUXvAz0+qQ=="
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/string/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/string",
3 | "version": "0.4.0",
4 | "description": "The reactive state management system for all modern Web Technologies",
5 | "main": "stoxy-string.js",
6 | "scripts": {},
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/stoxy-js/stoxy"
10 | },
11 | "author": "Matsuuu (https://matsu.fi/)",
12 | "license": "ISC",
13 | "dependencies": {
14 | "@stoxy/core": "^0.4.3",
15 | "@stoxy/element-base": "^0.4.0"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/string/stoxy-string.js:
--------------------------------------------------------------------------------
1 | import { read } from '@stoxy/core';
2 | import StoxyElement from "@stoxy/element-base";
3 |
4 | class StoxyString extends StoxyElement {
5 | _parseKey() {
6 | const key = this.innerHTML.trim();
7 | this.key = key;
8 | }
9 |
10 | stoxyUpdate(data) {
11 | if (!data) {
12 | this._updateContent(this.getNoDataValue());
13 | return;
14 | }
15 | let content;
16 | if (typeof data === 'object') {
17 | content = this._replaceObject(contentKey, this.key, data);
18 | } else {
19 | content = data;
20 | }
21 | this._updateContent(content);
22 | this._setReady(true);
23 | }
24 |
25 | async stoxyInit() {
26 | this._parseKey();
27 | const data = await read(this.key);
28 | if (!data) {
29 | this.stoxyUpdate(this.getAttribute('default') || "");
30 | return;
31 | }
32 | this.stoxyUpdate(data);
33 | this._dispatchUpdatedEvent(data);
34 | }
35 |
36 | static get observedAttributes() {
37 | return ['default'];
38 | }
39 | }
40 |
41 | if (!customElements.get('stoxy-string')) {
42 | customElements.define('stoxy-string', StoxyString);
43 | }
44 |
--------------------------------------------------------------------------------
/lib/update-components.sh:
--------------------------------------------------------------------------------
1 | cd form && npm version $1 && npm publish && cd ..
2 | cd object && npm version $1 && npm publish && cd ..
3 | cd repeat && npm version $1 && npm publish && cd ..
4 | cd string && npm version $1 && npm publish && cd ..
5 |
6 |
7 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@stoxy/stoxy",
3 | "version": "0.3.4",
4 | "description": "The reactive state management system equipped with Web Components.",
5 | "main": "index.js",
6 | "scripts": {
7 | "start": "wds --node-resolve --watch --open",
8 | "test": "web-test-runner \"test/**/*.test.js\" --node-resolve",
9 | "test-coverage": "web-test-runner \"test/**/*.test.js\" --node-resolve --coverage",
10 | "test-browser": "web-test-runner \"test/**/*.test.js\" --node-resolve --coverage --playwright --browsers chromium firefox webkit",
11 | "example:todo": "cd examples/todo-app && npm start",
12 | "example:userlist": "cd examples/user-list && npm start",
13 | "example:race-conditioning": "cd examples/race-conditioning && npm start"
14 | },
15 | "author": "Matsuuu (https://matsu.fi/)",
16 | "license": "ISC",
17 | "devDependencies": {
18 | "@esm-bundle/chai": "^4.3.4",
19 | "@simplr-wc/prettier-config": "^1.0.1",
20 | "@web/dev-server": "0.0.15",
21 | "@web/test-runner": "^0.12.19",
22 | "@web/test-runner-playwright": "^0.8.4"
23 | },
24 | "prettier": "@simplr-wc/prettier-config",
25 | "dependencies": {
26 | "@stoxy/core": "^0.3.3",
27 | "@stoxy/form": "^0.3.3",
28 | "@stoxy/object": "^0.3.3",
29 | "@stoxy/repeat": "^0.3.3",
30 | "@stoxy/string": "^0.3.3"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/test/add.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { add, read, clear, write } from '../lib/core';
3 |
4 | it('String should be addable', async () => {
5 | await clear("stoxy-state");
6 |
7 | add("stoxy-state", "Foo");
8 | add("stoxy-state", "Bar");
9 | add("stoxy-state", "Baz");
10 |
11 | const res = await read('stoxy-state');
12 |
13 | expect(res[0]).to.equal('Foo');
14 | expect(res[1]).to.equal('Bar');
15 | expect(res[2]).to.equal('Baz');
16 | });
17 |
18 | it('Numbers should be addable', async () => {
19 | await clear("stoxy-state");
20 |
21 | add("stoxy-state", 5);
22 | add("stoxy-state", 10);
23 | add("stoxy-state", 15);
24 |
25 | const res = await read('stoxy-state');
26 |
27 | expect(res[0]).to.equal(5);
28 | expect(res[1]).to.equal(10);
29 | expect(res[2]).to.equal(15);
30 | });
31 |
32 | it('Objects should be addable', async () => {
33 | await clear("stoxy-state");
34 |
35 | add("stoxy-state", { name: "John" });
36 | add("stoxy-state", { name: "Matt" });
37 | add("stoxy-state", { name: "Kate" });
38 |
39 | const res = await read('stoxy-state');
40 |
41 | expect(res[0].name).to.equal("John");
42 | expect(res[1].name).to.equal("Matt");
43 | expect(res[2].name).to.equal("Kate");
44 | });
45 |
46 | it('Arrays should be addable', async () => {
47 | await clear("stoxy-state");
48 |
49 | add("stoxy-state", [1, 2, 3]);
50 | add("stoxy-state", [4, 6, 8]);
51 | add("stoxy-state", [3, 6, 9]);
52 |
53 | const res = await read('stoxy-state');
54 |
55 | expect(res[0][0]).to.equal(1);
56 | expect(res[0][1]).to.equal(2);
57 | expect(res[0][2]).to.equal(3);
58 |
59 | expect(res[1][0]).to.equal(4);
60 | expect(res[1][1]).to.equal(6);
61 | expect(res[1][2]).to.equal(8);
62 |
63 | expect(res[2][0]).to.equal(3);
64 | expect(res[2][1]).to.equal(6);
65 | expect(res[2][2]).to.equal(9);
66 | });
67 |
68 | it("Should not reflect adds in state", async () => {
69 | const data = {
70 | arr: ["foo", "bar"]
71 | }
72 |
73 | write("stoxy-state", data);
74 | add("stoxy-state.arr", "baz");
75 |
76 | const res = await read("stoxy-state.arr");
77 |
78 | expect(res.length).to.equal(3);
79 | expect(res[2]).to.equal("baz");
80 | expect(data.arr.length).to.equal(2);
81 | });
82 |
--------------------------------------------------------------------------------
/test/cache.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, read, clear, sub, remove, persistKey } from '../lib/core';
3 |
4 | it('Should have cache remove items when overflowing', async () => {
5 |
6 | let removedItems = 0;
7 |
8 | sub("one", () => removedItems += 1);
9 |
10 | persistKey("one", "two", "three", "four", "five", "six");
11 | write("one", 1);
12 | write("two", 1);
13 | write("three", 1);
14 | write("four", 1);
15 | write("five", 1);
16 | write("six", 1);
17 |
18 | read("one");
19 | read("two");
20 | read("three");
21 | read("four");
22 | read("five");
23 | await read("six");
24 |
25 | expect(removedItems).to.equal(1);
26 | })
27 |
--------------------------------------------------------------------------------
/test/clear.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, read, clear } from '../lib/core';
3 |
4 | it('Clear should clear data', async () => {
5 | write("stoxy-state", "foo");
6 | const res = await read("stoxy-state");
7 | await clear("stoxy-state");
8 | const afterClearRes = await read("stoxy-state");
9 |
10 | expect(res).to.equal("foo");
11 | expect(afterClearRes).to.equal(undefined);
12 | })
13 |
14 | it("Clear without param should remove all state objects", async () => {
15 |
16 | await write("stoxy-state", "foo");
17 | await write("stoxy-state-two", "foo");
18 | await clear();
19 |
20 | const state = await read("stoxy-state");
21 | const stateTwo = await read("stoxy-state-two");
22 |
23 | expect(state).to.equal(undefined);
24 | expect(stateTwo).to.equal(undefined);
25 | });
26 |
--------------------------------------------------------------------------------
/test/errors.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, read, clear, persistKey } from '../lib/core';
3 |
4 |
5 | it('Should work even when iDB not in use', async () => {
6 | delete window.indexedDB;
7 |
8 | persistKey("stoxy-state");
9 |
10 | write("stoxy-state", {
11 | foo: "bar",
12 | bin: {
13 | baz: "xxx"
14 | }
15 | });
16 |
17 | const res = await read("stoxy-state");
18 | const foo = await read("stoxy-state.foo");
19 | const baz = await read("stoxy-state.bin.baz");
20 |
21 | expect(foo).to.equal("bar");
22 | expect(baz).to.equal("xxx");
23 | })
24 |
25 | it('Should work even when iDB stops working', async () => {
26 | delete window.indexedDB;
27 | window.indexedDB = true;
28 |
29 | persistKey("stoxy-state");
30 |
31 | write("stoxy-state", {
32 | foo: "bar",
33 | bin: {
34 | baz: "xxx"
35 | }
36 | });
37 |
38 | write("stoxy-state.bin.boo", "booboo");
39 | const res = await read("stoxy-state");
40 | const foo = await read("stoxy-state.foo");
41 | const baz = await read("stoxy-state.bin.baz");
42 |
43 | expect(foo).to.equal("bar");
44 | expect(baz).to.equal("xxx");
45 | })
46 |
47 | it("Can clear without iDB", async () => {
48 | delete window.indexedDB;
49 | await write("stoxy-state", { foo: "bar" })
50 | clear("stoxy-state");
51 | });
52 |
--------------------------------------------------------------------------------
/test/general.test.js:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | import { expect } from '@esm-bundle/chai';
3 | import { add, read, clear, write } from '../lib/core';
4 |
5 | it('Locks should clean up after themselves', async () => {
6 | await clear("stoxy-state");
7 |
8 | write("stoxy-state", "Foo");
9 | write("stoxy-state", "Bar");
10 | write("stoxy-state", "Baz");
11 |
12 | const res = await read('stoxy-state');
13 |
14 | expect(res).to.equal("Baz");
15 | expect(window._STOXY_LOCKS["stoxy-state"].length).to.equal(0);
16 | });
17 |
18 |
--------------------------------------------------------------------------------
/test/indexeddb.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, read, clear, sub, persistKey } from '../lib/core';
3 |
4 | // This test fails sometimes for no apparent reason
5 | it('Should save data to IndexedDB if persistKey is set', async () => {
6 | persistKey("persistent-state-key");
7 |
8 | await write("persistent-state-key", { id: 123, name: "Stoxy" });
9 | const readResult = await read("persistent-state-key");
10 |
11 | const dataInDb = await getValueFromIndexedDb();
12 |
13 | expect(dataInDb.id).to.equal(123);
14 | expect(dataInDb.name).to.equal("Stoxy");
15 | })
16 |
17 | function getValueFromIndexedDb() {
18 | return new Promise((resolve, reject) => {
19 | const request = window.indexedDB.open("StoxyStorage", 1);
20 | request.onsuccess = function(ev) {
21 | const db = ev.target.result;
22 | const transaction = db.transaction(["StoxyStorage"])
23 | const objectStore = transaction.objectStore("StoxyStorage");
24 |
25 | const query = objectStore.get("persistent-state-key");
26 |
27 | query.onsuccess = function(event) {
28 | const result = event.target.result;
29 | return resolve(result);
30 | }
31 |
32 | query.onerror = function(event) {
33 | console.log("ERROR");
34 | reject(query);
35 | }
36 | }
37 |
38 | request.onerror = function() {
39 | console.log("ERROR");
40 | }
41 | });
42 | }
43 |
--------------------------------------------------------------------------------
/test/queue.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { update, add, read, clear, write } from '../lib/core';
3 |
4 |
5 | it("Queue should resolve in order", async () => {
6 | write("stoxy-state", {
7 | foo: "bar",
8 | arr: [],
9 | counter: 0
10 | });
11 | add("stoxy-state.arr", "foo");
12 | add("stoxy-state.arr", "bar");
13 | add("stoxy-state.arr", "baz");
14 |
15 | update("stoxy-state.counter", c => c += 1);
16 | update("stoxy-state.counter", c => c += 1);
17 |
18 | const res = await read("stoxy-state");
19 |
20 | expect(res.foo).to.equal("bar");
21 | expect(res.arr[0]).to.equal("foo");
22 | expect(res.arr[1]).to.equal("bar");
23 | expect(res.arr[2]).to.equal("baz");
24 | expect(res.counter).to.equal(2);
25 | });
26 |
27 | it("Should be able to overwrite values with the queue", async () => {
28 | write("stoxy-state", "Foo");
29 | write("stoxy-state", "Bar");
30 | write("stoxy-state", "Baz");
31 |
32 | const res = await read("stoxy-state");
33 | expect(res).to.equal("Baz");
34 | });
35 |
--------------------------------------------------------------------------------
/test/read.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, read, persistKey } from '../lib/core';
3 |
4 | it('String read should work', async () => {
5 | const string = 'Stoxy';
6 | await write('stoxy-state', string);
7 | const res = await read('stoxy-state');
8 |
9 | expect(res).to.equal(string);
10 | });
11 |
12 | it('Number read should work', async () => {
13 | const number = 100;
14 | await write('stoxy-state', number);
15 | const res = await read('stoxy-state');
16 |
17 | expect(res).to.equal(number);
18 | });
19 |
20 | it("Should not break under a large event batch", async () => {
21 | for (let i = 0; i < 50; i++) {
22 | write("foo-" + i, { id: i });
23 | }
24 |
25 | for (let i = 0; i < 50; i++) {
26 | const res = await read("foo-" + i);
27 | expect(res.id).to.equal(i);
28 | }
29 | });
30 |
31 | it("Should get the latest object even with multiple writes", async () => {
32 | write("stoxy-state", { id: 1 });
33 | write("stoxy-state", { id: 1, name: "foo" });
34 | write("stoxy-state", { id: 1, name: "foo", age: 55 });
35 | write("stoxy-state", { id: 1, name: "foo", age: 55 });
36 | write("stoxy-state", { id: 1, name: "foo", age: 55, bar: { biz: "Ben" } });
37 |
38 | const res = await read("stoxy-state");
39 | const biz = await read("stoxy-state.bar.biz");
40 | expect(res.id).to.equal(1);
41 | expect(res.name).to.equal("foo");
42 | expect(res.age).to.equal(55);
43 | expect(res.bar.biz).to.equal("Ben");
44 | expect(biz).to.equal("Ben");
45 | });
46 |
47 | it('Object read should work', async () => {
48 | const obj = {
49 | foo: 'bar',
50 | bar: {
51 | bin: {
52 | boo: 'ZZZ'
53 | }
54 | }
55 | };
56 | await write('stoxy-state', obj);
57 | const res = await read('stoxy-state');
58 |
59 | expect(res.foo).to.equal(obj.foo);
60 | expect(res.bar.bin.boo).to.equal(obj.bar.bin.boo);
61 | });
62 |
63 | it('Array read should work', async () => {
64 | const arr = [
65 | "foo",
66 | "bar",
67 | "baz"
68 | ];
69 | await write('stoxy-state', arr);
70 | const res = await read('stoxy-state');
71 |
72 | expect(res[0]).to.equal(arr[0]);
73 | expect(res[1]).to.equal(arr[1]);
74 | expect(res[2]).to.equal(arr[2]);
75 | });
76 |
77 |
78 | it('Can read persisted state values', async () => {
79 | persistKey("stoxy-state");
80 | write("stoxy-state", {
81 | foo: "bar",
82 | bin: {
83 | baz: "foo"
84 | }
85 | });
86 |
87 | const foo = await read("stoxy-state.foo");
88 | const baz = await read("stoxy-state.bin.baz");
89 |
90 | expect(foo).to.equal("bar");
91 | expect(baz).to.equal("foo");
92 | });
93 |
94 | it("Can fetch undefined", async () => {
95 | const foo = await read("foo");
96 | const foobar = await read("foo.bar");
97 |
98 | expect(foo).to.equal(undefined);
99 | expect(foobar).to.equal(undefined);
100 | });
101 |
--------------------------------------------------------------------------------
/test/remove.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { remove, update, add, read, clear, write } from '../lib/core';
3 |
4 |
5 | it("Should be able to remove strings", async () => {
6 | write("stoxy-state", ["Foo", "Bar", "Baz"]);
7 |
8 | remove("stoxy-state", item => item === "Bar");
9 | const res = await read("stoxy-state");
10 |
11 | expect(res.length).to.equal(2);
12 | expect(res[0]).to.equal("Foo");
13 | expect(res[1]).to.equal("Baz");
14 | })
15 |
16 | it("Should be able to remove numbers", async () => {
17 | write("stoxy-state", [1, 2, 3]);
18 |
19 | remove("stoxy-state", item => item === 2);
20 | const res = await read("stoxy-state");
21 |
22 | expect(res.length).to.equal(2);
23 | expect(res[0]).to.equal(1);
24 | expect(res[1]).to.equal(3);
25 | })
26 |
27 | it("Should be able to remove objects", async () => {
28 | write("stoxy-state", [{ name: "Kate" }, { name: "Maisy" }, { name: "Misty" }]);
29 |
30 | remove("stoxy-state", item => item.name === "Maisy");
31 | const res = await read("stoxy-state");
32 |
33 | expect(res.length).to.equal(2);
34 | expect(res[0].name).to.equal("Kate");
35 | expect(res[1].name).to.equal("Misty");
36 | })
37 |
38 | it("Should be able to remove arrays", async () => {
39 | write("stoxy-state", [[1, 2], [1, 2, 3, 4], [1, 2, 3, 4, 5, 6]]);
40 |
41 | remove("stoxy-state", list => list.length <= 3);
42 | const res = await read("stoxy-state");
43 |
44 | expect(res.length).to.equal(2);
45 | expect(res[0].length).to.equal(4);
46 | expect(res[1].length).to.equal(6);
47 | })
48 |
--------------------------------------------------------------------------------
/test/sub.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, update, read, clear, sub, remove } from '../lib/core';
3 |
4 | it('Should react to sub events', async () => {
5 | let foo = 0;
6 | const unsub = sub("stoxy-state", (e) => {
7 | foo += 1
8 | });
9 |
10 | write("stoxy-state", "foo");
11 | clear("stoxy-state");
12 | write("stoxy-state", "fooo");
13 | await write("stoxy-state", "foooo");
14 |
15 | expect(foo).to.equal(4);
16 |
17 | unsub();
18 | })
19 |
20 | it('Should react to sub events on subkeys', async () => {
21 | let foo = 0;
22 |
23 | const unsub = sub("stoxy-state.bar.counter", (e) => {
24 | foo += 1
25 | });
26 |
27 | write("stoxy-state", {
28 | foo: "ff",
29 | bar: {
30 | counter: 0
31 | }
32 | });
33 | clear("stoxy-state");
34 | write("stoxy-state",
35 | {
36 | foo: "ff",
37 | bar: {
38 | counter: 0
39 | }
40 | }
41 | );
42 | await update("stoxy-state.bar.counter", c => c += 1);
43 |
44 | expect(foo).to.equal(4);
45 |
46 | unsub();
47 | })
48 |
49 | it('Should return subkey value on sub events on subkeys', async () => {
50 | let foo = 0;
51 | let counterVal = 0;
52 | const unsub = sub("stoxy-foo.bar.counter", (e) => {
53 | foo += 1
54 | counterVal = e.data;
55 | });
56 |
57 | write("stoxy-foo", {
58 | foo: "ff",
59 | bar: {
60 | counter: 0
61 | }
62 | });
63 | clear("stoxy-foo");
64 | write("stoxy-foo",
65 | {
66 | foo: "ff",
67 | bar: {
68 | counter: 0
69 | }
70 | }
71 | );
72 | await update("stoxy-foo.bar.counter", c => c += 1);
73 |
74 | expect(foo).to.equal(4);
75 | expect(counterVal).to.equal(1);
76 |
77 | unsub();
78 | })
79 |
80 | it('Event in subkey should trigger sub on parent key', async () => {
81 | let foo = 0;
82 | let counterVal = 0;
83 | const unsub = sub("stoxy-foo", (e) => {
84 | foo += 1
85 | counterVal = e.data;
86 | });
87 |
88 | write("stoxy-foo", {
89 | foo: "ff",
90 | bar: {
91 | counter: 0
92 | }
93 | });
94 | clear("stoxy-foo");
95 | write("stoxy-foo",
96 | {
97 | foo: "ff",
98 | bar: {
99 | counter: 0
100 | }
101 | }
102 | );
103 | await update("stoxy-foo.bar.counter", c => c += 1);
104 |
105 | expect(foo).to.equal(4);
106 |
107 | unsub();
108 | })
109 |
--------------------------------------------------------------------------------
/test/update.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { write, update, read } from '../lib/core';
3 |
4 | it('Number should update and not leave a reference', async () => {
5 | const num = 100;
6 | write('stoxy-state', num);
7 |
8 | update("stoxy-state", num => num += 10);
9 | update("stoxy-state", num => num += 10);
10 | update("stoxy-state", num => num += 10);
11 | update("stoxy-state", num => num += 10);
12 |
13 | const res = await read('stoxy-state');
14 |
15 | expect(res).to.equal(140);
16 | expect(num).to.equal(100);
17 | });
18 |
19 | it("Object should update and not leave a reference", async () => {
20 | const clickState = { clickCount: 0 };
21 |
22 | write("stoxy-state", clickState);
23 | update("stoxy-state", state => {
24 | state.clickCount += 1
25 | return state;
26 | });
27 |
28 | const res = await read("stoxy-state.clickCount");
29 | expect(res).to.equal(1);
30 | expect(clickState.clickCount).to.equal(0);
31 |
32 | });
33 |
34 | it("Object should update and not leave a reference on direct update", async () => {
35 | const clickState = { clickCount: 0 };
36 |
37 | write("stoxy-state", clickState);
38 | update("stoxy-state.clickCount", c => c += 1);
39 |
40 | const res = await read("stoxy-state");
41 | expect(res.clickCount).to.equal(1);
42 | expect(clickState.clickCount).to.equal(0);
43 | })
44 |
--------------------------------------------------------------------------------
/test/where.test.js:
--------------------------------------------------------------------------------
1 | import { expect } from '@esm-bundle/chai';
2 | import { add, where } from '../lib/core';
3 |
4 | it('Where clause should work on a array of items', async () => {
5 |
6 | add("stoxy-state", 1);
7 | add("stoxy-state", 2);
8 | add("stoxy-state", 3);
9 | add("stoxy-state", 4);
10 |
11 | const data = await where("stoxy-state", i => i < 3);
12 | expect(data.length).to.equal(2);
13 | })
14 |
15 | it('Where clause should work on a array of objects', async () => {
16 |
17 | add("stoxy-state", { id: 1, name: "Foo" });
18 | add("stoxy-state", { id: 2, name: "Bar" });
19 | add("stoxy-state", { id: 3, name: "Baz" });
20 | add("stoxy-state", { id: 4, name: "Bin" });
21 |
22 | const data = await where("stoxy-state", u => u.name === "Bin" || u.name === "Baz");
23 | expect(data.length).to.equal(2);
24 | })
25 |
--------------------------------------------------------------------------------