-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from sandwichfarm/lib/nip66
typescript port, lib/nip66, auditor
- Loading branch information
Showing
670 changed files
with
49,929 additions
and
19,772 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
nmHoistingLimits: workspaces | ||
|
||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-4.5.1.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"@nostrwatch/*": ["./node_modules/@nostrwatch/*/src"], | ||
}, | ||
"moduleResolution": "node", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": ["node_modules", "dist"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "public", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Check | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: svelte-check | ||
run: npm run check | ||
|
||
- name: Unit tests | ||
run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js 20.x | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Creating .npmrc | ||
run: | | ||
cat << EOF > "$HOME/.npmrc" | ||
//registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
EOF | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm run release | ||
createGithubReleases: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
node_modules | ||
|
||
# Output | ||
.output | ||
.vercel | ||
/.svelte-kit | ||
/build | ||
/dist | ||
|
||
# OS | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Env | ||
.env | ||
.env.* | ||
!.env.example | ||
!.env.test | ||
|
||
# Vite | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Package Managers | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# @careswitch/svelte-data-table | ||
|
||
## 0.6.3 | ||
|
||
### Patch Changes | ||
|
||
- 267e6ba: Added allRows getter to retrieve all unpaginated filtered and sorted table rows | ||
|
||
## 0.6.2 | ||
|
||
### Patch Changes | ||
|
||
- e5b1ed1: fix: `totalPages` should react to changes in base rows | ||
|
||
## 0.6.1 | ||
|
||
### Patch Changes | ||
|
||
- e44c770: perf: filter matching, sort handling null/undefined, non-capturing group for global filter regex | ||
|
||
## 0.6.0 | ||
|
||
### Minor Changes | ||
|
||
- 4ba9232: Custom `sorter` fn now parameterizes `getValue()` return values in addition to row objects | ||
|
||
## 0.5.4 | ||
|
||
### Patch Changes | ||
|
||
- 17b1089: Pagination accessors should react to filter state | ||
|
||
## 0.5.3 | ||
|
||
### Patch Changes | ||
|
||
- 2ee673a: rows getter should react to `originalData` | ||
|
||
## 0.5.2 | ||
|
||
### Patch Changes | ||
|
||
- ed69b69: Updating `baseRows` should retrigger filterState | ||
|
||
## 0.5.1 | ||
|
||
### Patch Changes | ||
|
||
- 94f0694: Ensure row access doesn't mutate state, see: https://github.com/sveltejs/svelte/issues/12457 | ||
|
||
## 0.5.0 | ||
|
||
### Minor Changes | ||
|
||
- 48cfdcf: Introduce `id` in column definition to allow multiple columns for the same key | ||
|
||
## 0.4.0 | ||
|
||
### Minor Changes | ||
|
||
- 26bea0d: Rename `filters` to `filterState`; introduce `sortState`, refactor filter mutators to reassign object | ||
|
||
## 0.3.0 | ||
|
||
### Minor Changes | ||
|
||
- 57b1ab6: Expose read and write access to base row data | ||
|
||
### Patch Changes | ||
|
||
- 57b1ab6: JSDoc comments for better documentation | ||
- 57b1ab6: Expand test coverage for edge cases | ||
- 57b1ab6: Performance improvements with fine-grained reactivity | ||
|
||
## 0.2.2 | ||
|
||
### Patch Changes | ||
|
||
- 58f6cdb: Package description, license, and keywords | ||
|
||
## 0.2.1 | ||
|
||
### Patch Changes | ||
|
||
- df3d810: Add project homepage | ||
|
||
## 0.2.0 | ||
|
||
### Minor Changes | ||
|
||
- efa074b: Public publishing with changesets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Careswitch | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<img align="center" alt="Svelte Data Table Screenshot" src="https://github.com/user-attachments/assets/fc527332-882b-463a-b070-d4714b32ec47"> | ||
|
||
--- | ||
|
||
- No dependencies | ||
- Blazing fast thanks to Svelte 5 and fine-grained reactivity | ||
- Fully typed with TypeScript | ||
- Comprehensive unit tests | ||
- Supports SvelteKit and SSR | ||
- Works great with shadcn [data table](https://www.shadcn-svelte.com/docs/components/data-table) | ||
|
||
## Demo | ||
|
||
**[Demo Website](https://careswitch-svelte-data-table.vercel.app)** | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install @careswitch/svelte-data-table | ||
``` | ||
|
||
_Requires Svelte 5 peer dependency_ | ||
|
||
## Usage | ||
|
||
```svelte | ||
<script lang="ts"> | ||
import { DataTable } from '@careswitch/svelte-data-table'; | ||
const table = new DataTable({ | ||
data: [ | ||
{ id: 1, name: 'John Doe', status: 'active' }, | ||
{ id: 2, name: 'Jane Doe', status: 'inactive' } | ||
], | ||
columns: [ | ||
{ id: 'id', key: 'id', name: 'ID' }, | ||
{ id: 'name', key: 'name', name: 'Name' }, | ||
{ id: 'status', key: 'status', name: 'Status' } | ||
] | ||
}); | ||
</script> | ||
<table> | ||
<thead> | ||
<tr> | ||
{#each table.columns as column (column.id)} | ||
<th>{column.name}</th> | ||
{/each} | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{#each table.rows as row (row.id)} | ||
<tr> | ||
{#each table.columns as column (column.id)} | ||
<td>{row[column.key]}</td> | ||
{/each} | ||
</tr> | ||
{/each} | ||
</tbody> | ||
</table> | ||
``` | ||
|
||
## Examples | ||
|
||
Refer to the demo website [+page.svelte](./src/routes/+page.svelte) and [unit tests](./src/index.test.ts) for more comprehensive examples. |
Oops, something went wrong.