diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 939c23e..0000000 --- a/.editorconfig +++ /dev/null @@ -1,33 +0,0 @@ -# http://editorconfig.org - -root = true - -[*] -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true -charset = utf-8 -end_of_line = lf - -[*.py] -indent_size = 4 -max_line_length = 120 - -[*.md] -indent_size = 4 - -[*.html] -indent_size = 4 -max_line_length = off - -[*.js] -max_line_length = off - -[*.css] -indent_size = 4 -max_line_length = off - -# Tests can violate line width restrictions in the interest of clarity. -[**/test_*.py] -max_line_length = off diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 1ff35c8..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @reactive-python/maintainers diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 12f72a6..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [archmonger] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 36e5aeb..0000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Start a Discussion - url: https://github.com/reactive-python/reactpy-router/discussions - about: Report issues, request features, ask questions, and share ideas diff --git a/.github/ISSUE_TEMPLATE/issue-form.yml b/.github/ISSUE_TEMPLATE/issue-form.yml deleted file mode 100644 index b4a4b89..0000000 --- a/.github/ISSUE_TEMPLATE/issue-form.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Plan a Task -description: Create a detailed plan of action (ONLY START AFTER DISCUSSION PLEASE 🙏). -labels: ["flag: triage"] -body: -- type: textarea - attributes: - label: Current Situation - description: Discuss how things currently are, why they require action, and any relevant prior discussion/context. - validations: - required: false -- type: textarea - attributes: - label: Proposed Actions - description: Describe what ought to be done, and why that will address the reasons for action mentioned above. - validations: - required: false diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index a555320..0000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,14 +0,0 @@ -## Description - - - -## Checklist - -Please update this checklist as you complete each item: - -- [ ] Tests have been developed for bug fixes or new functionality. -- [ ] The changelog has been updated, if necessary. -- [ ] Documentation has been updated, if necessary. -- [ ] GitHub Issues closed by this PR have been linked. - -By submitting this pull request I agree that all contributions comply with this project's open source license(s). diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 213f18a..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,62 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: ["main"] - pull_request: - # The branches below must be a subset of the branches above - branches: ["main"] - schedule: - # Runs at 22:21 on Monday. - - cron: "21 22 * * 1" - -jobs: - analyze: - name: Analyze - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: ["javascript", "python"] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/publish-develop-docs.yml b/.github/workflows/publish-develop-docs.yml deleted file mode 100644 index a1434ba..0000000 --- a/.github/workflows/publish-develop-docs.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Publish Develop Docs -on: - push: - branches: - - main -jobs: - publish-develop-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install dependencies - run: pip install --upgrade pip hatch uv - - name: Configure Git - run: | - git config user.name github-actions - git config user.email github-actions@github.com - - name: Publish Develop Docs - run: hatch run docs:deploy_develop - concurrency: - group: publish-docs diff --git a/.github/workflows/publish-latest-docs.yml b/.github/workflows/publish-latest-docs.yml deleted file mode 100644 index 0a1e996..0000000 --- a/.github/workflows/publish-latest-docs.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Publish Latest Docs -on: - release: - types: [published] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install dependencies - run: | - pip install --upgrade pip hatch uv - - name: Configure Git - run: | - git config user.name github-actions - git config user.email github-actions@github.com - - name: Publish ${{ github.event.release.name }} Docs - run: hatch run docs:deploy_latest ${{ github.ref_name }} - concurrency: - group: publish-docs diff --git a/.github/workflows/publish-python.yaml b/.github/workflows/publish-python.yaml deleted file mode 100644 index a2228a7..0000000 --- a/.github/workflows/publish-python.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: Publish Python - -on: - release: - types: [published] - -jobs: - publish-python: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install dependencies - run: pip install --upgrade pip hatch uv - - name: Build Package - run: hatch build --clean - - name: Publish to PyPI - env: - HATCH_INDEX_USER: ${{ secrets.PYPI_USERNAME }} - HATCH_INDEX_AUTH: ${{ secrets.PYPI_PASSWORD }} - run: hatch publish --yes diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml deleted file mode 100644 index 0a81d18..0000000 --- a/.github/workflows/test-docs.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Test - -on: - push: - branches: - - main - pull_request: - branches: - - main - schedule: - - cron: "0 0 * * *" - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install Python Dependencies - run: pip install --upgrade pip hatch uv - - name: Check documentation links - run: hatch run docs:linkcheck - - name: Check docs build - run: hatch run docs:build - - name: Check docs examples - run: hatch fmt docs --check diff --git a/.github/workflows/test-javascript.yml b/.github/workflows/test-javascript.yml deleted file mode 100644 index 5f62c0e..0000000 --- a/.github/workflows/test-javascript.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Test - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - javascript: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install Python Dependencies - run: pip install --upgrade pip hatch uv - - name: Run Tests - run: hatch run javascript:check diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml deleted file mode 100644 index bbac572..0000000 --- a/.github/workflows/test-python.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Test - -on: - push: - branches: - - main - pull_request: - branches: - - main - schedule: - - cron: "0 0 * * *" - -jobs: - python-source: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] - steps: - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - name: Use Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install Python Dependencies - run: pip install --upgrade pip hatch uv - - name: Run Tests - run: | - hatch test --cover --python ${{ matrix.python-version }} - mv .coverage ".coverage.py${{ matrix.python-version }}" - - name: Upload coverage data - uses: actions/upload-artifact@v4 - with: - name: "coverage-data-py${{ matrix.python-version }}" - path: ".coverage.py${{ matrix.python-version }}" - if-no-files-found: error - include-hidden-files: true - retention-days: 7 - - python-coverage: - needs: - - python-source - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install Python Dependencies - run: pip install --upgrade coverage[toml] - - name: Download data - uses: actions/download-artifact@v4 - with: - merge-multiple: true - - name: Combine coverage and fail if it's <100% - run: | - python -m coverage combine - python -m coverage html --skip-covered --skip-empty - python -m coverage report --fail-under=100 - - name: Upload HTML report - uses: actions/upload-artifact@v4 - with: - name: coverage-report - path: htmlcov - - python-formatting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - name: Install Python Dependencies - run: pip install --upgrade pip hatch uv - - name: Check Python formatting - run: hatch fmt src tests --check - - python-types: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: oven-sh/setup-bun@v2 - with: - bun-version: latest - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install Python Dependencies - run: pip install --upgrade pip hatch uv - - name: Run Python type checker - run: hatch run python:type_check diff --git a/docs/examples/python/__init__.py b/.nojekyll similarity index 100% rename from docs/examples/python/__init__.py rename to .nojekyll diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 32ad81f..0000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "proseWrap": "never", - "trailingComma": "all" -} diff --git a/0.1.1/404.html b/0.1.1/404.html new file mode 100755 index 0000000..f9ab4b5 --- /dev/null +++ b/0.1.1/404.html @@ -0,0 +1 @@ +
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
use_query
to use_search_params
.simple.router
to browser_router
.SimpleResolver
to StarletteResolver
.CONVERSION_TYPES
to CONVERTERS
.*
to {name:any}
.reactpy_router.link
to be a server-side component.reactpy_router.*
.reactpy_router.navigate
component that will force the client to navigate to a new URL (when rendered).Resolver
base class.link
elements could not have @component
type children.ctrl
+ click
on a link
element would not open in a new tab.reactpy
.starlette
.configure
to create_router
.idom-router
to reactpy-router
.You will need to set up a Python environment to develop ReactPy-Router.
If you plan to make code changes to this repository, you will need to install the following dependencies first:
Once done, you should clone this repository:
git clone https://github.com/reactive-python/reactpy-router.git
+cd reactpy-router
+
Then, by running the command below you can install the dependencies needed to run the ReactPy-Router development environment.
pip install -r requirements.txt --upgrade --verbose
+
Note
This repository uses Nox to run tests. For a full test of available scripts run nox -l
.
By running the command below you can run the full test suite:
nox -t test
+
Or, if you want to run the tests in the background run:
nox -t test -- --headless
+
Now, you can create/modify the ReactPy-Router source code, and Pull Request (PR) your changes to our GitHub repository.
To learn how to create GitHub PRs, click here.
You will need to set up a Python environment to create, test, and preview docs changes.
If you plan to make changes to this documentation, you will need to install the following dependencies first:
Once done, you should clone this repository:
git clone https://github.com/reactive-python/reactpy-router.git
+cd reactpy-router
+
Then, by running the command below you can:
pip install -r requirements.txt --upgrade
+
Finally, to verify that everything is working properly, you can manually run the docs preview web server.
cd docs
+mkdocs serve
+
Navigate to http://127.0.0.1:8000
to view a preview of the documentation.
Now, you can create/modify the ReactPy-Router source code, and Pull Request (PR) your changes to our GitHub repository.
To learn how to create GitHub PRs, click here.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var _a=/["'&<>]/;Pn.exports=Aa;function Aa(e){var t=""+e,r=_a.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i