Skip to content

Commit 99ebb18

Browse files
authored
Merge pull request #104 from skeletonlabs/dev
2 parents 421a722 + 78d4edc commit 99ebb18

File tree

107 files changed

+8299
-5280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+8299
-5280
lines changed

.changeset/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": "@changesets/cli/changelog",
3+
"changelog": ["@changesets/cli/changelog", { "repo": "skeletonlabs/floating-ui-svelte" }],
44
"commit": false,
55
"fixed": [],
66
"linked": [],
7-
"access": "restricted",
7+
"access": "public",
88
"baseBranch": "dev",
99
"updateInternalDependencies": "patch",
1010
"ignore": []

.changeset/green-pots-occur.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@skeletonlabs/floating-ui-svelte": minor
3+
---
4+
5+
Added `useId` hook

.changeset/purple-olives-rest.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@skeletonlabs/floating-ui-svelte": minor
3+
---
4+
5+
Added the `useClick` hook

.eslintrc.cjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ module.exports = {
55
'eslint:recommended',
66
'plugin:@typescript-eslint/recommended',
77
'plugin:svelte/recommended',
8-
'prettier'
8+
'prettier',
99
],
1010
parser: '@typescript-eslint/parser',
1111
plugins: ['@typescript-eslint'],
1212
parserOptions: {
1313
sourceType: 'module',
1414
ecmaVersion: 2020,
15-
extraFileExtensions: ['.svelte']
15+
extraFileExtensions: ['.svelte'],
1616
},
1717
env: {
1818
browser: true,
1919
es2017: true,
20-
node: true
20+
node: true,
2121
},
2222
overrides: [
2323
{
2424
files: ['*.svelte'],
2525
parser: 'svelte-eslint-parser',
2626
parserOptions: {
27-
parser: '@typescript-eslint/parser'
28-
}
29-
}
27+
parser: '@typescript-eslint/parser',
28+
},
29+
},
3030
],
3131
rules: {
3232
'@typescript-eslint/no-unused-vars': [
@@ -38,8 +38,8 @@ module.exports = {
3838
caughtErrorsIgnorePattern: '^_',
3939
destructuredArrayIgnorePattern: '^_',
4040
varsIgnorePattern: '^_',
41-
ignoreRestSiblings: true
42-
}
43-
]
44-
}
41+
ignoreRestSiblings: true,
42+
},
43+
],
44+
},
4545
};

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: [skeletonlabs]
4+
patreon: 'user?u=83786276' # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: skeletonlabs # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🐞 Bug
2+
description: Report an issue or bug
3+
labels: [bug]
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Current Behavior
8+
description: A description of what you're experiencing.
9+
validations:
10+
required: false
11+
- type: textarea
12+
attributes:
13+
label: Expected Behavior
14+
description: A description of what you're experiencing.
15+
validations:
16+
required: false
17+
- type: textarea
18+
attributes:
19+
label: Steps To Reproduce
20+
description: Describe how to reproduce the issue.
21+
placeholder: |
22+
1. Using this component...
23+
2. With these properties...
24+
3. Click '...'
25+
4. See error...
26+
validations:
27+
required: false
28+
- type: input
29+
id: reproduction
30+
attributes:
31+
label: Link to Reproduction / Stackblitz
32+
- type: textarea
33+
attributes:
34+
label: More Information
35+
description: |
36+
Provide relevant links or additional information.
37+
validations:
38+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Get support on Discord
4+
url: https://discord.com/channels/1003691521280856084/1003691521721245792
5+
about: Reach out on Discord in the floating-ui-svelte channel
6+
- name: Ask a question, give feedback, share your project
7+
url: https://github.com/skeletonlabs/floating-ui-svelte/discussions
8+
about: Connect with other community members with GitHub discussions

.github/ISSUE_TEMPLATE/docs_issue.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 📗 Report Docs Issue
2+
description: Use this to report a typo or incorrect information.
3+
labels: [documentation]
4+
body:
5+
- type: input
6+
id: link
7+
attributes:
8+
label: Link to the Page
9+
- type: textarea
10+
id: quote
11+
attributes:
12+
label: Describe the Issue (screenshots encouraged!)
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: 🛠️ Request New Feature
2+
description: Let us know what you would like to see added.
3+
labels: ['feature request']
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Describe the feature in detail (code, mocks, or screenshots encouraged)
9+
- type: textarea
10+
id: references
11+
attributes:
12+
label: Provide relevant links or additional information.

.github/pull_request_template.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Linked Issue
2+
3+
Closes #{issueNumber}
4+
5+
## Description
6+
7+
{description}
8+
9+
## Changesets
10+
11+
We use [Changesets](https://github.com/changesets/changesets) to automatically create our changelog per each release. Any changes or additions to the Library assets in `/lib` must be documented with a new Changeset. This can be done as follows:
12+
13+
1. Navigate to the root of the project on your feature branch.
14+
2. Run `pnpm changeset` to trigger the Changeset CLI.
15+
3. Follow the instructions when prompted.
16+
- Changesets should be either `minor` or `patch`. Never `major`.
17+
- Prefix your Changeset description using: `feature:`, `chore:` or `bugfix:`.
18+
4. Changeset `.md` files are added to the `/.changeset` directory.
19+
5. Commit and push the the new changeset file.
20+
21+
## Checklist
22+
23+
Please read and apply all [contribution requirements](https://github.com/skeletonlabs/floating-ui-svelte/blob/chore/main/CONTRIBUTING.md).
24+
25+
- [ ] PR targets the `dev` branch (NEVER `master`)
26+
- [ ] All website documentation is current with your changes
27+
- [ ] Ensure Prettier formatting is current - run `pnpm format`
28+
- [ ] Ensure ESLint linting is current - run `pnpm lint`
29+
- [ ] All test cases are passing - run `pnpm test`
30+
- [ ] Includes a changeset (if relevant; see above)

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,10 @@ jobs:
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3939
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
41+
- name: Merge main into dev after publish
42+
if: steps.changesets.outputs.published == 'true'
43+
run: |
44+
git checkout dev
45+
git merge main
46+
git push

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"useTabs": true,
33
"singleQuote": true,
4-
"trailingComma": "none",
4+
"trailingComma": "all",
55
"printWidth": 100,
66
"plugins": ["prettier-plugin-svelte"],
77
"overrides": [

CONTRIBUTING.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Contributing
2+
3+
This project is created using [SvelteKit](https://kit.svelte.dev/), [Tailwind](https://tailwindcss.com/) for styling, and [pnpm](https://pnpm.io/) for package management.
4+
5+
## How to Contribute
6+
7+
Take care to read all contributions guidelines before you begin!
8+
9+
1. Learn how to [contribute to open source](https://opensource.guide/how-to-contribute/).
10+
2. Follow a [step-by-step guide](https://github.com/firstcontributions/first-contributions) to practice your first contribution.
11+
3. Locate an [open issue on GitHub](https://github.com/skeletonlabs/floating-ui-svelte/issues). Let us know you would like to volunteer.
12+
4. Optionally, you may coordinate efforts on the `#contributors` channel within [Discord](https://discord.gg/EXqV7W8MtY).
13+
5. If the maintainers approves your request, you'll be assigned to the issue.
14+
6. Complete the work and submit a pull request and we'll review the changes.
15+
16+
> NOTE: non-trivial PRs submitted without our prior consent will be denied. Repeat offenders will be banned.
17+
18+
## Using PNPM
19+
20+
Floating UI Svelte makes use of [PNPM](https://pnpm.io/).
21+
22+
1. [Install PNPM](https://pnpm.io/installation) on your local computer.
23+
2. [Fork the repository](https://github.com/skeletonlabs/floating-ui-svelte) via your preferred option.
24+
3. Use Git to clone the forked project to your local machine.
25+
4. Point your terminal at the project.
26+
5. Run `pnpm i` to install the required dependencies.
27+
6. Run `pnpm dev` to start a local dev server.
28+
29+
## Project Structure
30+
31+
The floating UI Svelte project is built using SvelteKit to handle both the documentation and library assets.
32+
33+
| Path | Description |
34+
| --- | --- |
35+
| Documentation | Found in the `/src/routes` directory. |
36+
| Library | Found in the `/src/lib` directory. |
37+
38+
## Branch
39+
40+
Floating UI Svelte uses two primary branches. All pull requests should be created again the `dev` branch.
41+
42+
| Branch | Description | Pull Requests |
43+
| --- | --- | --- |
44+
| `dev` | The development branch. | Allowed |
45+
| `main` | The release branch. | Never |
46+
47+
### PR Branch Conventions
48+
49+
Please use the following naming convention when creating your pull request.
50+
51+
| Branch | Role |
52+
| --- | --- |
53+
| `docs/*` | Updates for the documentation site. |
54+
| `feature/*` | When implementing a new feature. |
55+
| `chore/*` | When implementing small changes. |
56+
| `bugfix/*` | When implementing feature bugfixes. |
57+
58+
Keep branch names short and semantic, using dashes to separate words.
59+
60+
```
61+
docs/getting-started-typo-fix
62+
bugfix/fixed-use-floating-bug
63+
```
64+
65+
## Changesets
66+
67+
[Changesets](https://github.com/changesets/changesets) are used to automatically generate the changelog for each release. Any contributions made to projects that live within the `/lib` directory must contain a Changeset. Use the following instructions to generate a changeset.
68+
69+
1. Make sure you're within local pull request feature branch.
70+
2. Navigate to the root of the project.
71+
3. Run `pnpm changeset` to trigger the Changeset CLI.
72+
4. Follow the instructions when prompted.
73+
5. Changeset are added to the `/.changeset` directory.
74+
6. Commit and push the the new changeset file.
75+
76+
Changesets use semantic version. We recommend the following convention.
77+
78+
| Version | Role |
79+
| --- | --- |
80+
| `major` | Do not use. Reserved for maintainers. |
81+
| `minor` | For notable changes, such as a new features. |
82+
| `patch` | For small changes, such as a chore or typo. |
83+
84+
Changeset descriptions will appear verbatim on the [Changelog](https://github.com/skeletonlabs/skeleton/blob/dev/packages/skeleton/CHANGELOG.md). Keep it short, semantic, and prefix this like branch names.
85+
86+
```mdx
87+
---
88+
'@skeletonlabs/floating-ui-svelte': minor
89+
---
90+
91+
feat: Added a new useFoo hook.
92+
```
93+
94+
## Tooling
95+
96+
Floating UI Svelte makes use of the following technology for improving the developer experience.
97+
98+
### Prettier
99+
100+
We use [Prettier](https://prettier.io/) for code formatting and linting.
101+
102+
```console
103+
pnpm format
104+
pnpm lint
105+
```
106+
107+
### Test Suite
108+
109+
Unit tests are handled via [Vitest](https://vitest.dev/).
110+
111+
```console
112+
pnpm vitest
113+
```

0 commit comments

Comments
 (0)