diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..b79b995 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,19 @@ +--- +name: Bug report +about: Report an issue +title: "" +labels: bug +assignees: "" +--- + +**Describe the bug** +A clear and concise description of the bug. + +**To Reproduce** +A minimal code example (preferably a runnable example on [Try PureScript](https://try.purescript.org)!) or steps to reproduce the issue. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/change-request.md b/.github/ISSUE_TEMPLATE/change-request.md new file mode 100644 index 0000000..a2ee685 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/change-request.md @@ -0,0 +1,21 @@ +--- +name: Change request +about: Propose an improvement to this library +title: "" +labels: "" +assignees: "" +--- + +**Is your change request related to a problem? Please describe.** +A clear and concise description of the problem. + +Examples: + +- It's frustrating to have to [...] +- I was looking for a function to [...] + +**Describe the solution you'd like** +A clear and concise description of what a good solution to you looks like, including any solutions you've already considered. + +**Additional context** +Add any other context about the change request here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..8d7661e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: PureScript Discourse + url: https://discourse.purescript.org/ + about: Ask and answer questions on the PureScript discussion forum. + - name: PureScript Discord + url: https://purescript.org/chat + about: Ask and answer questions on the PureScript chat. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..d8780f7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +**Description of the change** +Clearly and concisely describe the purpose of the pull request. If this PR relates to an existing issue or change proposal, please link to it. Include any other background context that would help reviewers understand the motivation for this PR. + +--- + +**Checklist:** + +- [ ] Added the change to the changelog's "Unreleased" section with a link to this PR and your username +- [ ] Linked any existing issues or proposals that this pull request should close +- [ ] Updated or added relevant documentation in the README and/or documentation directory +- [ ] Added a test for the contribution (if applicable) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7f61f24 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [master, main] + pull_request: + branches: [master, main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up a PureScript toolchain + uses: purescript-contrib/setup-purescript@main + with: + purescript: "latest" + purs-tidy: "latest" + spago: "unstable" + + - name: Cache PureScript dependencies + uses: actions/cache@v4 + with: + key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.lock') }} + path: | + .spago + output + + - name: Build source + run: spago build --censor-stats --strict --ensure-ranges --pedantic-packages + + - name: Run tests + run: spago test --offline --censor-stats --strict --pedantic-packages + + - name: Verify formatting + run: purs-tidy check src test diff --git a/bower.json b/bower.json deleted file mode 100644 index 668f88d..0000000 --- a/bower.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "purescript-nextjs", - "license": [ - "MIT" - ], - "repository": { - "type": "git", - "url": "https://github.com/rowtype-yoga/purescript-nextjs.git" - }, - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "output" - ], - "dependencies": { - "purescript-aff": "^v7.1.0", - "purescript-aff-promise": "^v4.0.0", - "purescript-console": "^v6.0.0", - "purescript-datetime": "^v6.1.0", - "purescript-effect": "^v4.0.0", - "purescript-either": "^v6.1.0", - "purescript-foldable-traversable": "^v6.0.0", - "purescript-foreign": "^v7.0.0", - "purescript-foreign-object": "^v4.1.0", - "purescript-functions": "^v6.0.0", - "purescript-identity": "^v6.0.0", - "purescript-maybe": "^v6.0.0", - "purescript-nullable": "^v6.0.0", - "purescript-options": "^v7.0.0", - "purescript-partial": "^v4.0.0", - "purescript-prelude": "^v6.0.1", - "purescript-react-basic": "^v17.0.0", - "purescript-react-basic-hooks": "^v8.1.2", - "purescript-transformers": "^v6.0.0", - "purescript-typelevel-prelude": "^v7.0.0", - "purescript-unsafe-coerce": "^v6.0.0", - "purescript-yoga-json": "https://github.com/rowtype-yoga/purescript-yoga-json.git#v4.0.1" - } -} diff --git a/package.json b/package.json index 6443b62..e14ae7c 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "author": "", "license": "MIT", "dependencies": { - "eslint-config-next": "^13.1.2", - "next": "^13.1.2", - "react": "^18.2.0", - "react-dom": "^18.2.0" + "eslint-config-next": "^15.2.4", + "next": "^15.2.4", + "react": "^19.0.0", + "react-dom": "^19.0.0" } } diff --git a/packages.dhall b/packages.dhall deleted file mode 100644 index 6b9d320..0000000 --- a/packages.dhall +++ /dev/null @@ -1,105 +0,0 @@ -{- -Welcome to your new Dhall package-set! - -Below are instructions for how to edit this file for most use -cases, so that you don't need to know Dhall to use it. - -## Use Cases - -Most will want to do one or both of these options: -1. Override/Patch a package's dependency -2. Add a package not already in the default package set - -This file will continue to work whether you use one or both options. -Instructions for each option are explained below. - -### Overriding/Patching a package - -Purpose: -- Change a package's dependency to a newer/older release than the - default package set's release -- Use your own modified version of some dependency that may - include new API, changed API, removed API by - using your custom git repo of the library rather than - the package set's repo - -Syntax: -where `entityName` is one of the following: -- dependencies -- repo -- version -------------------------------- -let upstream = -- -in upstream - with packageName.entityName = "new value" -------------------------------- - -Example: -------------------------------- -let upstream = -- -in upstream - with halogen.version = "master" - with halogen.repo = "https://example.com/path/to/git/repo.git" - - with halogen-vdom.version = "v4.0.0" - with halogen-vdom.dependencies = [ "extra-dependency" ] # halogen-vdom.dependencies -------------------------------- - -### Additions - -Purpose: -- Add packages that aren't already included in the default package set - -Syntax: -where `` is: -- a tag (i.e. "v4.0.0") -- a branch (i.e. "master") -- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977") -------------------------------- -let upstream = -- -in upstream - with new-package-name = - { dependencies = - [ "dependency1" - , "dependency2" - ] - , repo = - "https://example.com/path/to/git/repo.git" - , version = - "" - } -------------------------------- - -Example: -------------------------------- -let upstream = -- -in upstream - with benchotron = - { dependencies = - [ "arrays" - , "exists" - , "profunctor" - , "strings" - , "quickcheck" - , "lcg" - , "transformers" - , "foldable-traversable" - , "exceptions" - , "node-fs" - , "node-buffer" - , "node-readline" - , "datetime" - , "now" - ] - , repo = - "https://github.com/hdgarrood/purescript-benchotron.git" - , version = - "v7.0.0" - } -------------------------------- --} -let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20230105/packages.dhall - sha256:3e9fbc9ba03e9a1fcfd895f65e2d50ee2f5e86c4cd273f3d5c841b655a0e1bda - -in upstream diff --git a/spago.dhall b/spago.dhall deleted file mode 100644 index 23a6e28..0000000 --- a/spago.dhall +++ /dev/null @@ -1,30 +0,0 @@ -{ name = "nextjs" -, dependencies = - [ "aff" - , "aff-promise" - , "console" - , "datetime" - , "effect" - , "either" - , "foldable-traversable" - , "foreign" - , "foreign-object" - , "functions" - , "identity" - , "maybe" - , "nullable" - , "options" - , "partial" - , "prelude" - , "react-basic" - , "react-basic-hooks" - , "transformers" - , "typelevel-prelude" - , "unsafe-coerce" - , "yoga-json" - ] -, packages = ./packages.dhall -, sources = [ "src/**/*.purs", "test/**/*.purs" ] -, license = "MIT" -, repository = "https://github.com/rowtype-yoga/purescript-nextjs.git" -} diff --git a/spago.lock b/spago.lock new file mode 100644 index 0000000..8897eae --- /dev/null +++ b/spago.lock @@ -0,0 +1,1599 @@ +{ + "workspace": { + "packages": { + "nextjs": { + "path": "./", + "core": { + "dependencies": [ + { + "aff": ">=8.0.0 <9.0.0" + }, + { + "aff-promise": ">=4.0.0 <5.0.0" + }, + { + "console": ">=6.1.0 <7.0.0" + }, + { + "datetime": ">=6.1.0 <7.0.0" + }, + { + "effect": ">=4.0.0 <5.0.0" + }, + { + "either": ">=6.1.0 <7.0.0" + }, + { + "foldable-traversable": ">=6.0.0 <7.0.0" + }, + { + "foreign": ">=7.0.0 <8.0.0" + }, + { + "foreign-object": ">=4.1.0 <5.0.0" + }, + { + "functions": ">=6.0.0 <7.0.0" + }, + { + "identity": ">=6.0.0 <7.0.0" + }, + { + "maybe": ">=6.0.0 <7.0.0" + }, + { + "nullable": ">=6.0.0 <7.0.0" + }, + { + "options": ">=7.0.0 <8.0.0" + }, + { + "partial": ">=4.0.0 <5.0.0" + }, + { + "prelude": ">=6.0.2 <7.0.0" + }, + { + "react-basic": ">=17.0.0 <18.0.0" + }, + { + "react-basic-dom": ">=8.2.0 <9.0.0" + }, + { + "react-basic-hooks": ">=8.2.0 <9.0.0" + }, + { + "transformers": ">=6.1.0 <7.0.0" + }, + { + "typelevel-prelude": ">=7.0.0 <8.0.0" + }, + { + "unsafe-coerce": ">=6.0.0 <7.0.0" + }, + { + "yoga-json": ">=5.1.0 <6.0.0" + } + ], + "build_plan": [ + "aff", + "aff-promise", + "arrays", + "bifunctors", + "catenable-lists", + "console", + "const", + "contravariant", + "control", + "datetime", + "distributive", + "effect", + "either", + "enums", + "exceptions", + "exists", + "foldable-traversable", + "foreign", + "foreign-object", + "free", + "functions", + "functors", + "gen", + "identity", + "indexed-monad", + "integers", + "invariant", + "js-bigints", + "js-date", + "lazy", + "lists", + "maybe", + "media-types", + "newtype", + "nonempty", + "now", + "nullable", + "numbers", + "options", + "ordered-collections", + "orders", + "parallel", + "partial", + "prelude", + "profunctor", + "react-basic", + "react-basic-dom", + "react-basic-hooks", + "record", + "refs", + "safe-coerce", + "st", + "strings", + "tailrec", + "transformers", + "tuples", + "type-equality", + "typelevel-prelude", + "unfoldable", + "unsafe-coerce", + "unsafe-reference", + "variant", + "web-dom", + "web-events", + "web-file", + "web-html", + "web-storage", + "yoga-json", + "yoga-tree" + ] + }, + "test": { + "dependencies": [ + "console", + "effect" + ], + "build_plan": [ + "console", + "effect", + "prelude" + ] + } + } + }, + "package_set": { + "address": { + "registry": "63.6.0" + }, + "compiler": ">=0.15.15 <0.16.0", + "content": { + "abc-parser": "2.0.1", + "ace": "9.1.0", + "address-rfc2821": "0.1.1", + "aff": "8.0.0", + "aff-bus": "6.0.0", + "aff-coroutines": "9.0.0", + "aff-promise": "4.0.0", + "aff-retry": "2.0.0", + "affjax": "13.0.0", + "affjax-node": "1.0.0", + "affjax-web": "1.0.0", + "ansi": "7.0.0", + "apexcharts": "0.5.0", + "applicative-phases": "1.0.0", + "argonaut": "9.0.0", + "argonaut-aeson-generic": "0.4.1", + "argonaut-codecs": "9.1.0", + "argonaut-core": "7.0.0", + "argonaut-generic": "8.0.0", + "argonaut-traversals": "10.0.0", + "argparse-basic": "2.0.0", + "array-builder": "0.1.2", + "array-search": "0.6.0", + "arraybuffer": "13.2.0", + "arraybuffer-builder": "3.1.0", + "arraybuffer-types": "3.0.2", + "arrays": "7.3.0", + "arrays-extra": "0.6.1", + "arrays-zipper": "2.0.1", + "ask": "1.0.0", + "assert": "6.0.0", + "assert-multiple": "0.4.0", + "avar": "5.0.1", + "b64": "0.0.8", + "barbies": "1.0.1", + "barlow-lens": "0.9.0", + "bifunctors": "6.0.0", + "bigints": "7.0.1", + "bolson": "0.3.9", + "bookhound": "0.1.7", + "bower-json": "3.0.0", + "call-by-name": "4.0.1", + "canvas": "6.0.0", + "canvas-action": "9.0.0", + "cartesian": "1.0.6", + "catenable-lists": "7.0.0", + "cbor-stream": "1.3.0", + "chameleon": "1.0.0", + "chameleon-halogen": "1.0.3", + "chameleon-react-basic": "1.1.0", + "chameleon-styled": "2.5.0", + "chameleon-transformers": "1.0.0", + "channel": "1.0.0", + "checked-exceptions": "3.1.1", + "choku": "1.0.2", + "classless": "0.1.1", + "classless-arbitrary": "0.1.1", + "classless-decode-json": "0.1.1", + "classless-encode-json": "0.1.3", + "classnames": "2.0.0", + "codec": "6.1.0", + "codec-argonaut": "10.0.0", + "codec-json": "2.0.0", + "colors": "7.0.1", + "concur-core": "0.5.0", + "concur-react": "0.5.0", + "concurrent-queues": "3.0.0", + "console": "6.1.0", + "const": "6.0.0", + "contravariant": "6.0.0", + "control": "6.0.0", + "convertable-options": "1.0.0", + "coroutines": "7.0.0", + "css": "6.0.0", + "css-class-name-extractor": "0.0.4", + "css-frameworks": "1.0.1", + "csv-stream": "2.3.0", + "data-mvc": "0.0.2", + "datetime": "6.1.0", + "datetime-parsing": "0.2.0", + "debounce": "0.1.0", + "debug": "6.0.2", + "decimals": "7.1.0", + "default-values": "1.0.1", + "deku": "0.9.23", + "deno": "0.0.5", + "dissect": "1.0.0", + "distributive": "6.0.0", + "dodo-printer": "2.2.3", + "dom-filereader": "7.0.0", + "dom-indexed": "12.0.0", + "dom-simple": "0.4.0", + "dotenv": "4.0.3", + "droplet": "0.6.0", + "dts": "1.0.0", + "dual-numbers": "1.0.3", + "dynamic-buffer": "3.0.1", + "echarts-simple": "0.0.1", + "effect": "4.0.0", + "either": "6.1.0", + "elmish": "0.13.0", + "elmish-enzyme": "0.1.1", + "elmish-hooks": "0.10.3", + "elmish-html": "0.9.0", + "elmish-testing-library": "0.3.2", + "email-validate": "7.0.0", + "encoding": "0.0.9", + "enums": "6.0.1", + "env-names": "0.4.0", + "error": "2.0.0", + "eta-conversion": "0.3.2", + "exceptions": "6.1.0", + "exists": "6.0.0", + "exitcodes": "4.0.0", + "expect-inferred": "3.0.0", + "ezfetch": "1.1.0", + "fahrtwind": "2.0.0", + "fallback": "0.1.0", + "fast-vect": "1.2.0", + "fetch": "4.1.0", + "fetch-argonaut": "1.0.1", + "fetch-core": "5.1.0", + "fetch-yoga-json": "1.1.0", + "ffi-simple": "0.5.1", + "fft-js": "0.1.0", + "filterable": "5.0.0", + "fix-functor": "0.1.0", + "fixed-points": "7.0.0", + "fixed-precision": "5.0.0", + "flame": "1.3.0", + "float32": "2.0.0", + "fmt": "0.2.1", + "foldable-traversable": "6.0.0", + "foldable-traversable-extra": "0.0.6", + "foreign": "7.0.0", + "foreign-object": "4.1.0", + "foreign-readwrite": "3.4.0", + "forgetmenot": "0.1.0", + "fork": "6.0.0", + "form-urlencoded": "7.0.0", + "formatters": "7.0.0", + "framer-motion": "1.0.1", + "free": "7.1.0", + "freeap": "7.0.0", + "freer-free": "0.0.1", + "freet": "7.0.0", + "functions": "6.0.0", + "functor1": "3.0.0", + "functors": "5.0.0", + "fuzzy": "0.4.0", + "gen": "4.0.0", + "generate-values": "1.0.1", + "generic-router": "0.0.1", + "geojson": "0.0.5", + "geometria": "2.2.0", + "gesso": "1.0.0", + "gojs": "0.1.1", + "grain": "3.0.0", + "grain-router": "3.0.0", + "grain-virtualized": "3.0.0", + "graphs": "8.1.0", + "group": "4.1.1", + "halogen": "7.0.0", + "halogen-bootstrap5": "5.3.2", + "halogen-canvas": "1.0.0", + "halogen-css": "10.0.0", + "halogen-echarts-simple": "0.0.4", + "halogen-formless": "4.0.3", + "halogen-helix": "1.0.1", + "halogen-hooks": "0.6.3", + "halogen-hooks-extra": "0.9.0", + "halogen-infinite-scroll": "1.1.0", + "halogen-store": "0.5.4", + "halogen-storybook": "2.0.0", + "halogen-subscriptions": "2.0.0", + "halogen-svg-elems": "8.0.0", + "halogen-typewriter": "1.0.4", + "halogen-vdom": "8.0.0", + "halogen-vdom-string-renderer": "0.5.0", + "halogen-xterm": "2.0.0", + "heckin": "2.0.1", + "heterogeneous": "0.6.0", + "homogeneous": "0.4.0", + "http-methods": "6.0.0", + "httpurple": "4.0.0", + "huffman": "0.4.0", + "humdrum": "0.0.1", + "hyrule": "2.3.8", + "identity": "6.0.0", + "identy": "4.0.1", + "indexed-db": "1.0.0", + "indexed-monad": "3.0.0", + "int64": "3.0.0", + "integers": "6.0.0", + "interpolate": "5.0.2", + "intersection-observer": "1.0.1", + "invariant": "6.0.0", + "jarilo": "1.0.1", + "jelly": "0.10.0", + "jelly-router": "0.3.0", + "jelly-signal": "0.4.0", + "jest": "1.0.0", + "js-abort-controller": "1.0.0", + "js-bigints": "2.2.1", + "js-date": "8.0.0", + "js-fetch": "0.2.1", + "js-fileio": "3.0.0", + "js-intl": "1.1.4", + "js-iterators": "0.1.1", + "js-maps": "0.1.2", + "js-promise": "1.0.0", + "js-promise-aff": "1.0.0", + "js-timers": "6.1.0", + "js-uri": "3.1.0", + "jsdom": "1.0.0", + "json": "1.1.0", + "json-codecs": "5.0.0", + "justifill": "0.5.0", + "jwt": "0.0.9", + "labeled-data": "0.2.0", + "language-cst-parser": "0.14.1", + "lazy": "6.0.0", + "lazy-joe": "1.0.0", + "lcg": "4.0.0", + "leibniz": "5.0.0", + "leveldb": "1.0.1", + "liminal": "1.0.1", + "linalg": "6.0.0", + "lists": "7.0.0", + "literals": "1.0.2", + "logging": "3.0.0", + "logging-journald": "0.4.0", + "lumi-components": "18.0.0", + "machines": "7.0.0", + "maps-eager": "0.5.0", + "marionette": "1.0.0", + "marionette-react-basic-hooks": "0.1.1", + "marked": "0.1.0", + "matrices": "5.0.1", + "matryoshka": "1.0.0", + "maybe": "6.0.0", + "media-types": "6.0.0", + "meowclient": "1.0.0", + "midi": "4.0.0", + "milkis": "9.0.0", + "minibench": "4.0.1", + "mmorph": "7.0.0", + "monad-control": "5.0.0", + "monad-logger": "1.3.1", + "monad-loops": "0.5.0", + "monad-unlift": "1.0.1", + "monoid-extras": "0.0.1", + "monoidal": "0.16.0", + "morello": "0.4.0", + "mote": "3.0.0", + "motsunabe": "2.0.0", + "mvc": "0.0.1", + "mysql": "6.0.1", + "n3": "0.1.0", + "nano-id": "1.1.0", + "nanoid": "0.1.0", + "naturals": "3.0.0", + "nested-functor": "0.2.1", + "newtype": "5.0.0", + "nextjs": "0.1.1", + "nextui": "0.2.0", + "node-buffer": "9.0.0", + "node-child-process": "11.1.0", + "node-event-emitter": "3.0.0", + "node-execa": "5.0.0", + "node-fs": "9.2.0", + "node-glob-basic": "2.0.0", + "node-http": "9.1.0", + "node-http2": "1.1.1", + "node-human-signals": "1.0.0", + "node-net": "5.1.0", + "node-os": "5.1.0", + "node-path": "5.0.1", + "node-process": "11.2.0", + "node-readline": "8.1.1", + "node-sqlite3": "8.0.0", + "node-stream-pipes": "2.1.6", + "node-streams": "9.0.1", + "node-tls": "0.3.1", + "node-url": "7.0.1", + "node-workerbees": "0.3.1", + "node-zlib": "0.4.0", + "nonempty": "7.0.0", + "now": "6.0.0", + "npm-package-json": "2.0.0", + "nullable": "6.0.0", + "numberfield": "0.2.2", + "numbers": "9.0.1", + "oak": "3.1.1", + "oak-debug": "1.2.2", + "object-maps": "0.3.0", + "ocarina": "1.5.4", + "oooooooooorrrrrrrmm-lib": "0.0.1", + "open-colors-scales-and-schemes": "1.0.0", + "open-folds": "6.4.0", + "open-foreign-generic": "11.0.3", + "open-memoize": "6.2.0", + "open-mkdirp-aff": "1.2.0", + "open-pairing": "6.2.0", + "open-smolder": "12.0.2", + "options": "7.0.0", + "optparse": "5.0.1", + "ordered-collections": "3.2.0", + "ordered-set": "0.4.0", + "orders": "6.0.0", + "owoify": "1.2.0", + "pairs": "9.0.1", + "parallel": "7.0.0", + "parsing": "10.3.0", + "parsing-dataview": "3.2.4", + "partial": "4.0.0", + "pathy": "9.0.0", + "pha": "0.13.0", + "phaser": "0.7.0", + "phylio": "1.1.2", + "pipes": "8.0.0", + "pirates-charm": "0.0.1", + "pmock": "0.9.0", + "point-free": "1.0.0", + "pointed-list": "0.5.1", + "polymorphic-vectors": "4.0.0", + "posix-types": "6.0.0", + "postgresql": "2.0.20", + "precise": "6.0.0", + "precise-datetime": "7.0.0", + "prelude": "6.0.2", + "prettier-printer": "3.0.0", + "printf": "0.1.0", + "priority-queue": "0.1.2", + "profunctor": "6.0.1", + "profunctor-lenses": "8.0.0", + "protobuf": "4.4.0", + "psa-utils": "8.0.0", + "psci-support": "6.0.0", + "punycode": "1.0.0", + "qualified-do": "2.2.0", + "quantities": "12.2.0", + "quickcheck": "8.0.1", + "quickcheck-combinators": "0.1.3", + "quickcheck-laws": "7.0.0", + "quickcheck-utf8": "0.0.0", + "random": "6.0.0", + "rationals": "6.0.0", + "rdf": "0.1.0", + "react": "11.0.0", + "react-aria": "0.2.0", + "react-basic": "17.0.0", + "react-basic-classic": "3.0.0", + "react-basic-dnd": "10.1.0", + "react-basic-dom": "7.0.0", + "react-basic-dom-beta": "0.1.1", + "react-basic-emotion": "7.1.0", + "react-basic-hooks": "8.2.0", + "react-basic-storybook": "2.0.0", + "react-dom": "8.0.0", + "react-halo": "3.0.0", + "react-icons": "1.1.5", + "react-markdown": "0.1.0", + "react-testing-library": "4.0.1", + "react-virtuoso": "1.0.0", + "reactix": "0.6.1", + "read": "1.0.1", + "recharts": "1.1.0", + "record": "4.0.0", + "record-extra": "5.0.1", + "record-ptional-fields": "0.1.2", + "record-studio": "1.0.4", + "refs": "6.0.0", + "remotedata": "5.0.1", + "repr": "0.5.0", + "resize-observer": "1.0.0", + "resource": "2.0.1", + "resourcet": "1.0.0", + "result": "1.0.3", + "return": "0.2.0", + "ring-modules": "5.0.1", + "rito": "0.3.4", + "roman": "0.4.0", + "rough-notation": "1.0.2", + "routing": "11.0.0", + "routing-duplex": "0.7.0", + "run": "5.0.0", + "safe-coerce": "2.0.0", + "safely": "4.0.1", + "school-of-music": "1.3.0", + "selection-foldable": "0.2.0", + "selective-functors": "1.0.1", + "semirings": "7.0.0", + "shuffle": "1.1.0", + "signal": "13.0.0", + "simple-emitter": "3.0.1", + "simple-i18n": "2.0.1", + "simple-json": "9.0.0", + "simple-json-generics": "0.2.1", + "simple-ulid": "3.0.0", + "sized-matrices": "1.0.0", + "sized-vectors": "5.0.2", + "slug": "3.1.0", + "small-ffi": "4.0.1", + "soundfonts": "4.1.0", + "sparse-matrices": "2.0.1", + "sparse-polynomials": "3.0.1", + "spec": "8.1.1", + "spec-discovery": "8.4.0", + "spec-mocha": "5.1.1", + "spec-node": "0.0.3", + "spec-quickcheck": "5.0.2", + "spec-reporter-xunit": "0.7.1", + "splitmix": "2.1.0", + "ssrs": "1.0.0", + "st": "6.2.0", + "statistics": "0.3.2", + "strictlypositiveint": "1.0.1", + "string-parsers": "8.0.0", + "strings": "6.0.1", + "strings-extra": "4.0.0", + "stringutils": "0.0.12", + "substitute": "0.2.3", + "supply": "0.2.0", + "svg-parser": "3.0.0", + "systemd-journald": "0.3.0", + "tagged": "4.0.2", + "tailrec": "6.1.0", + "tanstack-query": "2.0.0", + "tecton": "0.2.1", + "tecton-halogen": "0.2.0", + "test-unit": "17.0.0", + "thermite": "6.3.1", + "thermite-dom": "0.3.1", + "these": "6.0.0", + "threading": "0.0.3", + "tidy": "0.11.1", + "tidy-codegen": "4.0.1", + "tldr": "0.0.0", + "toestand": "0.9.0", + "transformation-matrix": "1.0.1", + "transformers": "6.1.0", + "tree-rose": "4.0.2", + "trivial-unfold": "0.4.1", + "ts-bridge": "4.0.0", + "tuples": "7.0.0", + "two-or-more": "1.0.0", + "type-equality": "4.0.1", + "typedenv": "2.0.1", + "typelevel": "6.0.0", + "typelevel-lists": "2.1.0", + "typelevel-peano": "1.0.1", + "typelevel-prelude": "7.0.0", + "typelevel-regex": "0.0.3", + "typelevel-rows": "0.1.0", + "typisch": "0.4.0", + "uint": "7.0.0", + "ulid": "3.0.1", + "uncurried-transformers": "1.1.0", + "undefined": "2.0.0", + "undefined-is-not-a-problem": "1.1.0", + "unfoldable": "6.0.0", + "unicode": "6.0.0", + "unique": "0.6.1", + "unlift": "1.0.1", + "unordered-collections": "3.1.0", + "unsafe-coerce": "6.0.0", + "unsafe-reference": "5.0.0", + "untagged-to-tagged": "0.1.4", + "untagged-union": "1.0.0", + "uri": "9.0.0", + "url-immutable": "1.0.0", + "uuid": "9.0.0", + "uuidv4": "1.0.0", + "validation": "6.0.0", + "variant": "8.0.0", + "variant-encodings": "2.0.0", + "vectorfield": "1.0.1", + "vectors": "2.1.0", + "versions": "7.0.0", + "visx": "0.0.2", + "vitest": "1.0.0", + "web-clipboard": "6.0.0", + "web-cssom": "2.0.0", + "web-cssom-view": "0.1.0", + "web-dom": "6.0.0", + "web-dom-parser": "8.0.0", + "web-dom-xpath": "3.0.0", + "web-encoding": "3.0.0", + "web-events": "4.0.0", + "web-fetch": "4.0.1", + "web-file": "4.0.0", + "web-geometry": "0.1.0", + "web-html": "4.1.0", + "web-pointerevents": "2.0.0", + "web-proletarian": "1.0.0", + "web-promise": "3.2.0", + "web-resize-observer": "2.1.0", + "web-router": "1.0.0", + "web-socket": "4.0.0", + "web-storage": "5.0.0", + "web-streams": "4.0.0", + "web-touchevents": "4.0.0", + "web-uievents": "5.0.0", + "web-url": "2.0.0", + "web-workers": "1.1.0", + "web-xhr": "5.0.1", + "webextension-polyfill": "0.1.0", + "webgpu": "0.0.1", + "which": "2.0.0", + "whine-core": "0.0.28", + "xterm": "1.0.0", + "yoga-fetch": "1.0.1", + "yoga-json": "5.1.0", + "yoga-om": "0.1.0", + "yoga-postgres": "6.0.0", + "yoga-react-dom": "1.0.1", + "yoga-subtlecrypto": "0.1.0", + "yoga-tree": "1.0.0", + "z3": "0.0.2", + "zipperarray": "2.0.0" + } + }, + "extra_packages": {} + }, + "packages": { + "aff": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-5MmdI4+0RHBtSBy+YlU3/Cq4R5W2ih3OaRedJIrVHdk=", + "dependencies": [ + "bifunctors", + "control", + "datetime", + "effect", + "either", + "exceptions", + "foldable-traversable", + "functions", + "maybe", + "newtype", + "parallel", + "prelude", + "refs", + "tailrec", + "transformers", + "unsafe-coerce" + ] + }, + "aff-promise": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-Kq5EupbUpXeUXx4JqGQE7/RTTz/H6idzWhsocwlEFhM=", + "dependencies": [ + "aff", + "foreign" + ] + }, + "arrays": { + "type": "registry", + "version": "7.3.0", + "integrity": "sha256-tmcklBlc/muUtUfr9RapdCPwnlQeB3aSrC4dK85gQlc=", + "dependencies": [ + "bifunctors", + "control", + "foldable-traversable", + "functions", + "maybe", + "nonempty", + "partial", + "prelude", + "safe-coerce", + "st", + "tailrec", + "tuples", + "unfoldable", + "unsafe-coerce" + ] + }, + "bifunctors": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-/gZwC9YhNxZNQpnHa5BIYerCGM2jeX9ukZiEvYxm5Nw=", + "dependencies": [ + "const", + "either", + "newtype", + "prelude", + "tuples" + ] + }, + "catenable-lists": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-76vYENhwF4BWTBsjeLuErCH2jqVT4M3R1HX+4RwSftA=", + "dependencies": [ + "control", + "foldable-traversable", + "lists", + "maybe", + "prelude", + "tuples", + "unfoldable" + ] + }, + "console": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-CxmAzjgyuGDmt9FZW51VhV6rBPwR6o0YeKUzA9rSzcM=", + "dependencies": [ + "effect", + "prelude" + ] + }, + "const": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-tNrxDW8D8H4jdHE2HiPzpLy08zkzJMmGHdRqt5BQuTc=", + "dependencies": [ + "invariant", + "newtype", + "prelude" + ] + }, + "contravariant": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-TP+ooAp3vvmdjfQsQJSichF5B4BPDHp3wAJoWchip6c=", + "dependencies": [ + "const", + "either", + "newtype", + "prelude", + "tuples" + ] + }, + "control": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-sH7Pg9E96JCPF9PIA6oQ8+BjTyO/BH1ZuE/bOcyj4Jk=", + "dependencies": [ + "newtype", + "prelude" + ] + }, + "datetime": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-g/5X5BBegQWLpI9IWD+sY6mcaYpzzlW5lz5NBzaMtyI=", + "dependencies": [ + "bifunctors", + "control", + "either", + "enums", + "foldable-traversable", + "functions", + "gen", + "integers", + "lists", + "maybe", + "newtype", + "numbers", + "ordered-collections", + "partial", + "prelude", + "tuples" + ] + }, + "distributive": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-HTDdmEnzigMl+02SJB88j+gAXDx9VKsbvR4MJGDPbOQ=", + "dependencies": [ + "identity", + "newtype", + "prelude", + "tuples", + "type-equality" + ] + }, + "effect": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-eBtZu+HZcMa5HilvI6kaDyVX3ji8p0W9MGKy2K4T6+M=", + "dependencies": [ + "prelude" + ] + }, + "either": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-6hgTPisnMWVwQivOu2PKYcH8uqjEOOqDyaDQVUchTpY=", + "dependencies": [ + "control", + "invariant", + "maybe", + "prelude" + ] + }, + "enums": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-HWaD73JFLorc4A6trKIRUeDMdzE+GpkJaEOM1nTNkC8=", + "dependencies": [ + "control", + "either", + "gen", + "maybe", + "newtype", + "nonempty", + "partial", + "prelude", + "tuples", + "unfoldable" + ] + }, + "exceptions": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-K0T89IHtF3vBY7eSAO7eDOqSb2J9kZGAcDN5+IKsF8E=", + "dependencies": [ + "effect", + "either", + "maybe", + "prelude" + ] + }, + "exists": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-A0JQHpTfo1dNOj9U5/Fd3xndlRSE0g2IQWOGor2yXn8=", + "dependencies": [ + "unsafe-coerce" + ] + }, + "foldable-traversable": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-fLeqRYM4jUrZD5H4WqcwUgzU7XfYkzO4zhgtNc3jcWM=", + "dependencies": [ + "bifunctors", + "const", + "control", + "either", + "functors", + "identity", + "maybe", + "newtype", + "orders", + "prelude", + "tuples" + ] + }, + "foreign": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-1ORiqoS3HW+qfwSZAppHPWy4/6AQysxZ2t29jcdUMNA=", + "dependencies": [ + "either", + "functions", + "identity", + "integers", + "lists", + "maybe", + "prelude", + "strings", + "transformers" + ] + }, + "foreign-object": { + "type": "registry", + "version": "4.1.0", + "integrity": "sha256-q24okj6mT+yGHYQ+ei/pYPj5ih6sTbu7eDv/WU56JVo=", + "dependencies": [ + "arrays", + "foldable-traversable", + "functions", + "gen", + "lists", + "maybe", + "prelude", + "st", + "tailrec", + "tuples", + "typelevel-prelude", + "unfoldable" + ] + }, + "free": { + "type": "registry", + "version": "7.1.0", + "integrity": "sha256-JAumgEsGSzJCNLD8AaFvuX7CpqS5yruCngi6yI7+V5k=", + "dependencies": [ + "catenable-lists", + "control", + "distributive", + "either", + "exists", + "foldable-traversable", + "invariant", + "lazy", + "maybe", + "prelude", + "tailrec", + "transformers", + "tuples", + "unsafe-coerce" + ] + }, + "functions": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-adMyJNEnhGde2unHHAP79gPtlNjNqzgLB8arEOn9hLI=", + "dependencies": [ + "prelude" + ] + }, + "functors": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-zfPWWYisbD84MqwpJSZFlvM6v86McM68ob8p9s27ywU=", + "dependencies": [ + "bifunctors", + "const", + "contravariant", + "control", + "distributive", + "either", + "invariant", + "maybe", + "newtype", + "prelude", + "profunctor", + "tuples", + "unsafe-coerce" + ] + }, + "gen": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-f7yzAXWwr+xnaqEOcvyO3ezKdoes8+WXWdXIHDBCAPI=", + "dependencies": [ + "either", + "foldable-traversable", + "identity", + "maybe", + "newtype", + "nonempty", + "prelude", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "identity": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-4wY0XZbAksjY6UAg99WkuKyJlQlWAfTi2ssadH0wVMY=", + "dependencies": [ + "control", + "invariant", + "newtype", + "prelude" + ] + }, + "indexed-monad": { + "type": "registry", + "version": "3.0.0", + "integrity": "sha256-N8yYLH7iRVnsprSAusJ369pUprXJo9gN9xM5XXSB+bM=", + "dependencies": [ + "control", + "newtype" + ] + }, + "integers": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-sf+sK26R1hzwl3NhXR7WAu9zCDjQnfoXwcyGoseX158=", + "dependencies": [ + "maybe", + "numbers", + "prelude" + ] + }, + "invariant": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-RGWWyYrz0Hs1KjPDA+87Kia67ZFBhfJ5lMGOMCEFoLo=", + "dependencies": [ + "control", + "prelude" + ] + }, + "js-bigints": { + "type": "registry", + "version": "2.2.1", + "integrity": "sha256-hKWZo9NxtsAaHmNXr6B8GY4c0olQbYLXPVGWm4TF2Ss=", + "dependencies": [ + "integers", + "maybe", + "prelude" + ] + }, + "js-date": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-6TVF4DWg5JL+jRAsoMssYw8rgOVALMUHT1CuNZt8NRo=", + "dependencies": [ + "datetime", + "effect", + "exceptions", + "foreign", + "integers", + "now" + ] + }, + "lazy": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-lMsfFOnlqfe4KzRRiW8ot5ge6HtcU3Eyh2XkXcP5IgU=", + "dependencies": [ + "control", + "foldable-traversable", + "invariant", + "prelude" + ] + }, + "lists": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-EKF15qYqucuXP2lT/xPxhqy58f0FFT6KHdIB/yBOayI=", + "dependencies": [ + "bifunctors", + "control", + "foldable-traversable", + "lazy", + "maybe", + "newtype", + "nonempty", + "partial", + "prelude", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "maybe": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-5cCIb0wPwbat2PRkQhUeZO0jcAmf8jCt2qE0wbC3v2Q=", + "dependencies": [ + "control", + "invariant", + "newtype", + "prelude" + ] + }, + "media-types": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-n/4FoGBasbVSYscGVRSyBunQ6CZbL3jsYL+Lp01mc9k=", + "dependencies": [ + "newtype", + "prelude" + ] + }, + "newtype": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-gdrQu8oGe9eZE6L3wOI8ql/igOg+zEGB5ITh2g+uttw=", + "dependencies": [ + "prelude", + "safe-coerce" + ] + }, + "nonempty": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-54ablJZUHGvvlTJzi3oXyPCuvY6zsrWJuH/dMJ/MFLs=", + "dependencies": [ + "control", + "foldable-traversable", + "maybe", + "prelude", + "tuples", + "unfoldable" + ] + }, + "now": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-xZ7x37ZMREfs6GCDw/h+FaKHV/3sPWmtqBZRGTxybQY=", + "dependencies": [ + "datetime", + "effect" + ] + }, + "nullable": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-yiGBVl3AD+Guy4kNWWeN+zl1gCiJK+oeIFtZtPCw4+o=", + "dependencies": [ + "effect", + "functions", + "maybe" + ] + }, + "numbers": { + "type": "registry", + "version": "9.0.1", + "integrity": "sha256-/9M6aeMDBdB4cwYDeJvLFprAHZ49EbtKQLIJsneXLIk=", + "dependencies": [ + "functions", + "maybe" + ] + }, + "options": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-treC6h+jvzcWhplPaF/aMENCOx+JGk+ysa5pL1BGHtg=", + "dependencies": [ + "contravariant", + "foreign", + "foreign-object", + "maybe", + "tuples" + ] + }, + "ordered-collections": { + "type": "registry", + "version": "3.2.0", + "integrity": "sha256-o9jqsj5rpJmMdoe/zyufWHFjYYFTTsJpgcuCnqCO6PM=", + "dependencies": [ + "arrays", + "foldable-traversable", + "gen", + "lists", + "maybe", + "partial", + "prelude", + "st", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "orders": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-nBA0g3/ai0euH8q9pSbGqk53W2q6agm/dECZTHcoink=", + "dependencies": [ + "newtype", + "prelude" + ] + }, + "parallel": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-gUC9i4Txnx9K9RcMLsjujbwZz6BB1bnE2MLvw4GIw5o=", + "dependencies": [ + "control", + "effect", + "either", + "foldable-traversable", + "functors", + "maybe", + "newtype", + "prelude", + "profunctor", + "refs", + "transformers" + ] + }, + "partial": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-fwXerld6Xw1VkReh8yeQsdtLVrjfGiVuC5bA1Wyo/J4=", + "dependencies": [] + }, + "prelude": { + "type": "registry", + "version": "6.0.2", + "integrity": "sha256-kiAPZxihtAel8uRiTNdccf4qylp/9J3jNkEHNAD0MsE=", + "dependencies": [] + }, + "profunctor": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-E58hSYdJvF2Qjf9dnWLPlJKh2Z2fLfFLkQoYi16vsFk=", + "dependencies": [ + "control", + "distributive", + "either", + "exists", + "invariant", + "newtype", + "prelude", + "tuples" + ] + }, + "react-basic": { + "type": "registry", + "version": "17.0.0", + "integrity": "sha256-xE5sL14ITpSRCbAnWrp7KAfbzv+Ft0rSaAnjkqKcSVY=", + "dependencies": [ + "effect", + "prelude", + "record" + ] + }, + "react-basic-dom": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-a9M8K2iVA3AAhJQGj36bapcdmGJk9ichLghK4/ZFkB0=", + "dependencies": [ + "arrays", + "effect", + "foldable-traversable", + "foreign-object", + "maybe", + "nullable", + "prelude", + "react-basic", + "record", + "unsafe-coerce", + "web-dom", + "web-events", + "web-file", + "web-html" + ] + }, + "react-basic-hooks": { + "type": "registry", + "version": "8.2.0", + "integrity": "sha256-Ptu4w3DFLv7Chff650CCADcm4eeXfO/5jubd7QwJjsQ=", + "dependencies": [ + "aff", + "aff-promise", + "bifunctors", + "console", + "control", + "datetime", + "effect", + "either", + "exceptions", + "foldable-traversable", + "functions", + "indexed-monad", + "integers", + "maybe", + "newtype", + "now", + "nullable", + "ordered-collections", + "prelude", + "react-basic", + "refs", + "tuples", + "type-equality", + "unsafe-coerce", + "unsafe-reference", + "web-html" + ] + }, + "record": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-Za5U85bTRJEfGK5Sk4hM41oXy84YQI0I8TL3WUn1Qzg=", + "dependencies": [ + "functions", + "prelude", + "unsafe-coerce" + ] + }, + "refs": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-Vgwne7jIbD3ZMoLNNETLT8Litw6lIYo3MfYNdtYWj9s=", + "dependencies": [ + "effect", + "prelude" + ] + }, + "safe-coerce": { + "type": "registry", + "version": "2.0.0", + "integrity": "sha256-a1ibQkiUcbODbLE/WAq7Ttbbh9ex+x33VCQ7GngKudU=", + "dependencies": [ + "unsafe-coerce" + ] + }, + "st": { + "type": "registry", + "version": "6.2.0", + "integrity": "sha256-z9X0WsOUlPwNx9GlCC+YccCyz8MejC8Wb0C4+9fiBRY=", + "dependencies": [ + "partial", + "prelude", + "tailrec", + "unsafe-coerce" + ] + }, + "strings": { + "type": "registry", + "version": "6.0.1", + "integrity": "sha256-WssD3DbX4OPzxSdjvRMX0yvc9+pS7n5gyPv5I2Trb7k=", + "dependencies": [ + "arrays", + "control", + "either", + "enums", + "foldable-traversable", + "gen", + "integers", + "maybe", + "newtype", + "nonempty", + "partial", + "prelude", + "tailrec", + "tuples", + "unfoldable", + "unsafe-coerce" + ] + }, + "tailrec": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-Xx19ECVDRrDWpz9D2GxQHHV89vd61dnXxQm0IcYQHGk=", + "dependencies": [ + "bifunctors", + "effect", + "either", + "identity", + "maybe", + "partial", + "prelude", + "refs" + ] + }, + "transformers": { + "type": "registry", + "version": "6.1.0", + "integrity": "sha256-3Bm+Z6tsC/paG888XkywDngJ2JMos+JfOhRlkVfb7gI=", + "dependencies": [ + "control", + "distributive", + "effect", + "either", + "exceptions", + "foldable-traversable", + "identity", + "lazy", + "maybe", + "newtype", + "prelude", + "st", + "tailrec", + "tuples", + "unfoldable" + ] + }, + "tuples": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-1rXgTomes9105BjgXqIw0FL6Fz1lqqUTLWOumhWec1M=", + "dependencies": [ + "control", + "invariant", + "prelude" + ] + }, + "type-equality": { + "type": "registry", + "version": "4.0.1", + "integrity": "sha256-Hs9D6Y71zFi/b+qu5NSbuadUQXe5iv5iWx0226vOHUw=", + "dependencies": [] + }, + "typelevel-prelude": { + "type": "registry", + "version": "7.0.0", + "integrity": "sha256-uFF2ph+vHcQpfPuPf2a3ukJDFmLhApmkpTMviHIWgJM=", + "dependencies": [ + "prelude", + "type-equality" + ] + }, + "unfoldable": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-JtikvJdktRap7vr/K4ITlxUX1QexpnqBq0G/InLr6eg=", + "dependencies": [ + "foldable-traversable", + "maybe", + "partial", + "prelude", + "tuples" + ] + }, + "unsafe-coerce": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-IqIYW4Vkevn8sI+6aUwRGvd87tVL36BBeOr0cGAE7t0=", + "dependencies": [] + }, + "unsafe-reference": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-zU7BhfJU14nXQRZG9iADsp0mSiKhz07OcKyjRB2YT+Y=", + "dependencies": [ + "prelude" + ] + }, + "variant": { + "type": "registry", + "version": "8.0.0", + "integrity": "sha256-SR//zQDg2dnbB8ZHslcxieUkCeNlbMToapvmh9onTtw=", + "dependencies": [ + "enums", + "lists", + "maybe", + "partial", + "prelude", + "record", + "tuples", + "unsafe-coerce" + ] + }, + "web-dom": { + "type": "registry", + "version": "6.0.0", + "integrity": "sha256-1kSKWFDI4LupdmpjK01b1MMxDFW7jvatEgPgVmCmSBQ=", + "dependencies": [ + "web-events" + ] + }, + "web-events": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-YDt8b6u1tzGtnWyNRodne57iO8FNSGPaTCVzBUyUn4k=", + "dependencies": [ + "datetime", + "enums", + "foreign", + "nullable" + ] + }, + "web-file": { + "type": "registry", + "version": "4.0.0", + "integrity": "sha256-1h5jPBkvjY71jLEdwVadXCx86/2inNoMBO//Rd3eCSU=", + "dependencies": [ + "foreign", + "media-types", + "web-dom" + ] + }, + "web-html": { + "type": "registry", + "version": "4.1.0", + "integrity": "sha256-ByqS/h1/yG+hjCOnOQp7L1QpIWzQENNKB1kaHtpEhlE=", + "dependencies": [ + "js-date", + "web-dom", + "web-file", + "web-storage" + ] + }, + "web-storage": { + "type": "registry", + "version": "5.0.0", + "integrity": "sha256-q+6lxcnfWxus0/nDeFVtF1V+tLehZvvXQ0cduYPLksY=", + "dependencies": [ + "nullable", + "web-events" + ] + }, + "yoga-json": { + "type": "registry", + "version": "5.1.0", + "integrity": "sha256-ei/fyvrh8fGgcqGrdRQ7+r6dwSYcfEGOFf5yKc1g7oE=", + "dependencies": [ + "arrays", + "bifunctors", + "control", + "datetime", + "effect", + "either", + "exceptions", + "foldable-traversable", + "foreign", + "foreign-object", + "free", + "identity", + "integers", + "js-bigints", + "js-date", + "lists", + "maybe", + "newtype", + "nullable", + "numbers", + "ordered-collections", + "partial", + "prelude", + "record", + "strings", + "transformers", + "tuples", + "typelevel-prelude", + "unsafe-coerce", + "variant", + "yoga-tree" + ] + }, + "yoga-tree": { + "type": "registry", + "version": "1.0.0", + "integrity": "sha256-wBjfEYrX1ffTHa/mE9B26C6td0FFfjYNnysTJ9/N8Hc=", + "dependencies": [ + "arrays", + "control", + "foldable-traversable", + "free", + "maybe", + "prelude", + "tailrec" + ] + } + } +} diff --git a/spago.yaml b/spago.yaml new file mode 100644 index 0000000..798b21e --- /dev/null +++ b/spago.yaml @@ -0,0 +1,54 @@ +package: + name: nextjs + publish: + license: MIT + version: 0.1.1 + location: + githubOwner: rowtype-yoga + githubRepo: purescript-nextjs + dependencies: + - aff: ">=8.0.0 <9.0.0" + - aff-promise: ">=4.0.0 <5.0.0" + - console: ">=6.1.0 <7.0.0" + - datetime: ">=6.1.0 <7.0.0" + - effect: ">=4.0.0 <5.0.0" + - either: ">=6.1.0 <7.0.0" + - foldable-traversable: ">=6.0.0 <7.0.0" + - foreign: ">=7.0.0 <8.0.0" + - foreign-object: ">=4.1.0 <5.0.0" + - functions: ">=6.0.0 <7.0.0" + - identity: ">=6.0.0 <7.0.0" + - maybe: ">=6.0.0 <7.0.0" + - nullable: ">=6.0.0 <7.0.0" + - options: ">=7.0.0 <8.0.0" + - partial: ">=4.0.0 <5.0.0" + - prelude: ">=6.0.2 <7.0.0" + - react-basic: ">=17.0.0 <18.0.0" + - react-basic-dom: ">=8.2.0 <9.0.0" + - react-basic-hooks: ">=8.2.0 <9.0.0" + - transformers: ">=6.1.0 <7.0.0" + - typelevel-prelude: ">=7.0.0 <8.0.0" + - unsafe-coerce: ">=6.0.0 <7.0.0" + - yoga-json: ">=5.1.0 <6.0.0" + test: + main: Test.Main + dependencies: + - console + - effect +workspace: + extraPackages: + {} + # react-basic: + # # git: https://github.com/purescript-react/purescript-react-basic + # # ref: master + # path: /home/srghma/projects/purescript-react-basic + # react-basic-dom: + # # git: https://github.com/purescript-react/purescript-react-basic-dom + # # ref: master + # path: /home/srghma/projects/purescript-react-basic-dom + # react-basic-hooks: + # # git: https://github.com/purescript-react/purescript-react-basic-hooks + # # ref: master + # path: /home/srghma/projects/purescript-react-basic-hooks + packageSet: + registry: 63.6.0 diff --git a/src/Next/Document.js b/src/Next/Document.js index b028691..0dc3ff1 100644 --- a/src/Next/Document.js +++ b/src/Next/Document.js @@ -1,10 +1,6 @@ -import document from "next/document"; -export var _html = document.Html; -export var _head = document.Head; -export var _main = document.Main; -export var _nextScript = document.NextScript; +export { Html as _html, Head as _head, Main as _main, NextScript as _nextScript } from "next/document" -export const unsafeDocument = component => () => { +export function unsafeDocumentImpl(component) { component.getInitialProps = nextDoc.getInitialProps return component } diff --git a/src/Next/Document.purs b/src/Next/Document.purs index 0b8fe8b..8b2b042 100644 --- a/src/Next/Document.purs +++ b/src/Next/Document.purs @@ -1,6 +1,7 @@ module Next.Document where import Effect (Effect) +import Effect.Uncurried import Prim.Row (class Union) import React.Basic.Hooks (JSX, ReactComponent, element) @@ -62,7 +63,10 @@ nextScript attrs = element _nextScript attrs foreign import _nextScript :: forall attrs. ReactComponent attrs -- | Document -foreign import unsafeDocument +unsafeDocument :: ∀ props. (ReactComponent props) -> Effect (ReactComponent props) +unsafeDocument = runEffectFn1 unsafeDocumentImpl + +foreign import unsafeDocumentImpl ∷ ∀ props - . ReactComponent props - → Effect (ReactComponent props) + . EffectFn1 (ReactComponent props) + (ReactComponent props) diff --git a/src/Next/Image.js b/src/Next/Image.js index 2f4547e..555ca57 100644 --- a/src/Next/Image.js +++ b/src/Next/Image.js @@ -1,3 +1 @@ -import image from "next/image.js" - -export const imageImpl = image; +export { default as imageImpl } from "next/image.js" diff --git a/src/Next/Image.purs b/src/Next/Image.purs index fb28b8a..9cb9ef7 100644 --- a/src/Next/Image.purs +++ b/src/Next/Image.purs @@ -1,26 +1,192 @@ module Next.Image where +import Data.Nullable (Nullable) +import Data.Unit (Unit) +import Effect.Uncurried (EffectFn1) +import Foreign.Object (Object) import Prim.Row (class Union) +import React.Basic (JSX, Ref) +import React.Basic.DOM.Internal (CSS) +import React.Basic.Events (EventHandler) import React.Basic.Hooks (ReactComponent) +import Web.DOM (Node) -foreign import data StaticallyImportedImage ∷ Type +foreign import data StaticallyImportedImage :: Type -- | Components -type Props_static_image = - ( src ∷ StaticallyImportedImage - , alt ∷ String - , layout ∷ String - , objectFit ∷ String - , objectPosition ∷ String - , quality ∷ Int - , placeholder ∷ String - , className ∷ String +type Props_static_image_optional = + ------- those are props which are mentioned in documentation + -- , layout :: String -- removed + -- , objectFit :: String -- removed + -- , objectPosition :: String -- removed + ( loader :: ({ src :: String, width :: Int, quality :: Int } → String) + , fill :: Boolean + , sizes :: String + , quality :: Int + , priority :: Boolean + , placeholder :: String + , style :: CSS + , onLoadingComplete :: EffectFn1 { width ∷ Int, height ∷ Int } Unit + , onLoad :: EventHandler + , onError :: EventHandler + , loading :: String + , blurDataURL :: String + , overrideSrc :: String + ------- Other props, taken from Props_img, then removed duplicates + , _aria :: Object String + , _data :: Object String + , about :: String + , acceptCharset :: String + , accessKey :: String + , allowFullScreen :: Boolean + , allowTransparency :: Boolean + , alt :: String + , autoFocus :: Boolean + , autoPlay :: Boolean + , capture :: Boolean + , cellPadding :: String + , cellSpacing :: String + , charSet :: String + , classID :: String + , className :: String + , colSpan :: Int + , contentEditable :: Boolean + , contextMenu :: String + , crossOrigin :: String + , dangerouslySetInnerHTML :: { __html :: String } + , datatype :: String + , dateTime :: String + , dir :: String + , draggable :: Boolean + , encType :: String + , formAction :: String + , formEncType :: String + , formMethod :: String + , formNoValidate :: Boolean + , formTarget :: String + , frameBorder :: String + , height :: String + , hidden :: Boolean + , hrefLang :: String + , htmlFor :: String + , httpEquiv :: String + , icon :: String + , id :: String + , inlist :: String + , inputMode :: String + , is :: String + , itemID :: String + , itemProp :: String + , itemRef :: String + , itemScope :: Boolean + , itemType :: String + , key :: String + , keyParams :: String + , keyType :: String + , lang :: String + -- , loading :: String + , marginHeight :: String + , marginWidth :: String + , maxLength :: Int + , mediaGroup :: String + , minLength :: Int + , name :: String + , noValidate :: Boolean + , onAnimationEnd :: EventHandler + , onAnimationIteration :: EventHandler + , onAnimationStart :: EventHandler + , onBlur :: EventHandler + , onClick :: EventHandler + , onCompositionEnd :: EventHandler + , onCompositionStart :: EventHandler + , onCompositionUpdate :: EventHandler + , onContextMenu :: EventHandler + , onCopy :: EventHandler + , onCut :: EventHandler + , onDoubleClick :: EventHandler + , onDrag :: EventHandler + , onDragEnd :: EventHandler + , onDragEnter :: EventHandler + , onDragExit :: EventHandler + , onDragLeave :: EventHandler + , onDragOver :: EventHandler + , onDragStart :: EventHandler + , onDrop :: EventHandler + -- , onError :: EventHandler + , onFocus :: EventHandler + , onGotPointerCapture :: EventHandler + , onInvalid :: EventHandler + , onKeyDown :: EventHandler + , onKeyPress :: EventHandler + , onKeyUp :: EventHandler + -- , onLoad :: EventHandler + , onLostPointerCapture :: EventHandler + , onMouseDown :: EventHandler + , onMouseEnter :: EventHandler + , onMouseLeave :: EventHandler + , onMouseMove :: EventHandler + , onMouseOut :: EventHandler + , onMouseOver :: EventHandler + , onMouseUp :: EventHandler + , onPaste :: EventHandler + , onPointerCancel :: EventHandler + , onPointerDown :: EventHandler + , onPointerEnter :: EventHandler + , onPointerLeave :: EventHandler + , onPointerMove :: EventHandler + , onPointerOut :: EventHandler + , onPointerOver :: EventHandler + , onPointerUp :: EventHandler + , onSelect :: EventHandler + , onSubmit :: EventHandler + , onTouchCancel :: EventHandler + , onTouchEnd :: EventHandler + , onTouchMove :: EventHandler + , onTouchStart :: EventHandler + , onTransitionEnd :: EventHandler + , onWheel :: EventHandler + , prefix :: String + , property :: String + , radioGroup :: String + , readOnly :: Boolean + , ref :: Ref (Nullable Node) + , resource :: String + , role :: String + , rowSpan :: Int + , scoped :: Boolean + , seamless :: Boolean + , security :: String + -- , sizes :: String + , slot :: String + , spellCheck :: Boolean + , src :: String + , srcDoc :: JSX + , srcLang :: String + , srcSet :: String + -- , style :: CSS + , suppressContentEditableWarning :: Boolean + , tabIndex :: Int + , title :: String + , typeof :: String + , unselectable :: Boolean + , useMap :: String + , vocab :: String + , width :: String + , wmode :: String + ) + +type Props_static_image_required other = + ( src :: StaticallyImportedImage + , alt :: String + , width :: Int + , height :: Int + | other ) staticImage - ∷ ∀ attrs attrs_ - . Union attrs attrs_ Props_static_image - ⇒ ReactComponent { src ∷ StaticallyImportedImage | attrs } + :: ∀ attrs attrs_ + . Union attrs attrs_ Props_static_image_optional + => ReactComponent { | Props_static_image_required attrs } staticImage = imageImpl -foreign import imageImpl ∷ ∀ attrs. ReactComponent attrs +foreign import imageImpl :: ∀ attrs. ReactComponent attrs diff --git a/src/Next/Link.js b/src/Next/Link.js index d8eba52..744f4e1 100644 --- a/src/Next/Link.js +++ b/src/Next/Link.js @@ -1 +1 @@ -export { default as _link} from "next/link" +export { default as _link } from "next/link" diff --git a/src/Next/Router.js b/src/Next/Router.js index 203657e..01bb326 100644 --- a/src/Next/Router.js +++ b/src/Next/Router.js @@ -1,41 +1,23 @@ -import nextRouter, { useRouter } from "next/navigation"; +import nextRouter from "next/navigation"; -export const onImpl = function (event) { - return function (cb) { - return function () { - nextRouter.events.on(event, cb); - }; - }; -}; - -export const offImpl = function (event) { - return function (cb) { - return function () { - nextRouter.events.off(event, cb); - }; - }; -}; +export { useRouter as useRouterImpl } from "next/navigation"; -export const useRouterImpl = () => useRouter(); +export const onImpl = nextRouter.events.on +export const offImpl = nextRouter.events.off -export const queryImpl = (nr) => nr.query; - -export function pathnameImpl(nr) { - return () => nr.pathname; -} +export const query = (nr) => nr.query; +export const pathnameImpl = (nr) => nr.pathname +export const asPathImpl = (nr) => nr.asPath -export const asPathImpl = (nr) => nr.asPath; - -export const pushImpl = (path) => (as) => (options) => (routerInstance) => () => +export function pushImpl(path, as, options, routerInstance) { routerInstance.push(path, as, options); +}; -export function pushImplNoAs(path) { - return (options) => (routerInstance) => () => { - routerInstance.push(path, undefined, options); - }; +export function pushImplNoAs(path, options, routerInstance) { + routerInstance.push(path, undefined, options); } -export const historyPushState = (href) => (as) => () => { +export function historyPushStateImpl(href, as) { window.history.pushState( _objectSpread( _objectSpread({}, window.history.state), @@ -43,10 +25,10 @@ export const historyPushState = (href) => (as) => () => { { as: as, url: href, - } + }, ), "", - href + href, ); }; @@ -79,7 +61,7 @@ function _objectSpread(target) { Object.defineProperty( target, key, - Object.getOwnPropertyDescriptor(source, key) + Object.getOwnPropertyDescriptor(source, key), ); }); } @@ -101,12 +83,12 @@ function _defineProperty(obj, key, value) { return obj; } -export const mkOnRouteChangeStartHandler = (fn) => () => (url, opts) => - fn(url)(opts)(); -export const addOnRouteChangeStartHandler = (handler) => (router) => () => { + +export function addOnRouteChangeStartHandler(handler, router) { router.events.on("routeChangeStart", handler); return () => router.events.off("routeChangeStart", handler); }; -export const replaceImpl = (router) => (route) => (as) => (options) => () => +export function replaceImpl(router, route, as, options) { router.replace(route, as, options); +}; diff --git a/src/Next/Router.purs b/src/Next/Router.purs index 9d7778f..c47ae32 100644 --- a/src/Next/Router.purs +++ b/src/Next/Router.purs @@ -18,8 +18,7 @@ module Next.Router , routeChangeComplete , routeChangeError , useRouter - ) - where + ) where import Prelude @@ -31,17 +30,17 @@ import Data.Nullable as Nullable import Data.Options (Options, options) import Effect (Effect) import Effect.Aff (Aff) -import Effect.Uncurried (EffectFn1, mkEffectFn1, runEffectFn1) +import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, EffectFn4, mkEffectFn1, mkEffectFn2, runEffectFn1, runEffectFn2, runEffectFn3, runEffectFn4) import Foreign (Foreign) import Next.Router.PushOptions (PushOptions) import React.Basic.Hooks (Hook, unsafeHook) -foreign import onImpl ∷ ∀ a. String → a → Effect Unit +foreign import onImpl ∷ ∀ a. EffectFn2 String a Unit -foreign import offImpl ∷ ∀ a. String → a → Effect Unit +foreign import offImpl ∷ ∀ a. EffectFn2 String a Unit event ∷ ∀ a. String → a → Effect (Effect Unit) -event name cb = onImpl name cb $> offImpl name cb +event name cb = runEffectFn2 onImpl name cb $> runEffectFn2 offImpl name cb onRouteChangeStart ∷ (String → Effect Unit) → Effect (Effect Unit) onRouteChangeStart = event "routeChangeStart" <<< mkEffectFn1 @@ -56,57 +55,61 @@ routeChangeError = event "routeChangeError" <<< mkEffectFn1 foreign import data NextRouter ∷ Type foreign import useRouterImpl ∷ Effect NextRouter -foreign import queryImpl ∷ NextRouter → Foreign - -query ∷ NextRouter → Foreign -query = queryImpl +foreign import query ∷ NextRouter → Foreign foreign import data UseRouter ∷ Type → Type useRouter ∷ Hook UseRouter NextRouter useRouter = unsafeHook useRouterImpl -foreign import pathnameImpl ∷ NextRouter → Effect String +foreign import pathnameImpl ∷ EffectFn1 NextRouter String pathname :: NextRouter -> Effect String -pathname = pathnameImpl +pathname = runEffectFn1 pathnameImpl foreign import pushImpl - ∷ String → String → Options PushOptions → NextRouter → Effect Unit + ∷ EffectFn4 String String (Options PushOptions) NextRouter Unit foreign import pushImplNoAs - ∷ String → Foreign → NextRouter → Effect Unit + ∷ EffectFn3 String Foreign NextRouter Unit push_ ∷ String → NextRouter → Effect Unit push_ href = push href mempty push ∷ String → Options PushOptions → NextRouter → Effect Unit -push href = options >>> pushImplNoAs href +push href = options >>> runEffectFn3 pushImplNoAs href pushAs_ ∷ String → String → NextRouter → Effect Unit pushAs_ href as = pushAs href as (mempty) pushAs ∷ String → String → Options PushOptions → NextRouter → Effect Unit -pushAs href as = pushImpl href as +pushAs href as opts router = runEffectFn4 pushImpl href as opts router + +foreign import historyPushStateImpl ∷ EffectFn2 String String Unit -foreign import historyPushState ∷ String → String → Effect Unit +historyPushState :: String -> String -> Effect Unit +historyPushState href as = runEffectFn2 historyPushStateImpl href as foreign import asPathImpl ∷ EffectFn1 NextRouter String asPath ∷ NextRouter → Effect String asPath = runEffectFn1 asPathImpl -foreign import data RouteChangeStartHandler ∷ Type +newtype RouteChangeStartHandler = RouteChangeStartHandlerUnsafeCreate (EffectFn2 String { shallow ∷ Boolean } Unit) -foreign import mkOnRouteChangeStartHandler +mkOnRouteChangeStartHandler ∷ (String → { shallow ∷ Boolean } → Effect Unit) - → Effect RouteChangeStartHandler + → Effect RouteChangeStartHandler -- TODO: why should be created only using Effect? +mkOnRouteChangeStartHandler fn = pure $ RouteChangeStartHandlerUnsafeCreate $ mkEffectFn2 fn -- | Returns the unregister function for easy use in hooks -foreign import addOnRouteChangeStartHandler - ∷ RouteChangeStartHandler → NextRouter → Effect (Effect Unit) +foreign import addOnRouteChangeStartHandlerImpl + ∷ EffectFn2 RouteChangeStartHandler NextRouter Unit + +addOnRouteChangeStartHandler :: RouteChangeStartHandler -> NextRouter -> Effect Unit +addOnRouteChangeStartHandler = runEffectFn2 addOnRouteChangeStartHandlerImpl -foreign import replaceImpl :: NextRouter -> String -> Nullable String -> Options PushOptions -> Effect (Promise Boolean) +foreign import replaceImpl :: EffectFn4 NextRouter String (Nullable String) (Options PushOptions) (Promise Boolean) replace :: NextRouter -> String -> Maybe String -> Options PushOptions -> Aff Boolean -replace router url asUrl options = replaceImpl router url (Nullable.toNullable asUrl) options # Promise.toAffE +replace router url asUrl options = runEffectFn4 replaceImpl router url (Nullable.toNullable asUrl) options # Promise.toAffE diff --git a/src/Next/SWR.purs b/src/Next/SWR.purs index 749cceb..2b2f9c5 100644 --- a/src/Next/SWR.purs +++ b/src/Next/SWR.purs @@ -1,10 +1,6 @@ module NextUI.SWR where -import Prelude - import Control.Promise (Promise) -import Data.Function.Uncurried (Fn2) -import Data.Nullable (Nullable) import Effect (Effect) import Effect.Uncurried (EffectFn1, EffectFn2, mkEffectFn1, runEffectFn2) import React.Basic.Hooks (Hook, ReactComponent, unsafeHook) diff --git a/src/Next/Script.purs b/src/Next/Script.purs index e9bb11c..e7a10a3 100644 --- a/src/Next/Script.purs +++ b/src/Next/Script.purs @@ -1,7 +1,5 @@ module Next.Script where -import Prelude - import React.Basic (ReactComponent) foreign import script :: forall props. ReactComponent { | props }