Skip to content

Commit b86c07a

Browse files
author
stefanBid
committed
feat: initialize sb-floating-panel library with Vue 3 composable hook
- Added package.json for project metadata and dependencies. - Implemented useFloatingPanel composable in use-sb-floating-panel/useSbFloatingPanel.ts for managing floating panels with arrow and resize support. - Configured TypeScript with tsconfig.json for strict type checking and declaration generation. - Set up Vite configuration in vite.config.ts for building the library in both ES and UMD formats.
1 parent 2d5adb0 commit b86c07a

File tree

10 files changed

+4579
-0
lines changed

10 files changed

+4579
-0
lines changed

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22.15.0'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Lint
26+
run: npm run lint
27+
28+
- name: Type check
29+
run: npm run check
30+
31+
- name: Build
32+
run: npm run build

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Node
2+
node_modules/
3+
dist/
4+
types/
5+
.env
6+
7+
# TypeScript
8+
*.tsbuildinfo
9+
10+
# macOS/Linux/Windows
11+
.DS_Store
12+
Thumbs.db
13+
14+
# Logs
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*
18+
pnpm-debug.log*
19+
20+
# VS Code
21+
.vscode/

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"printWidth": 100,
5+
"tabWidth": 2,
6+
"trailingComma": "es5"
7+
}

eslint.config.cjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
const tsParser = require('@typescript-eslint/parser');
2+
const tsPlugin = require('@typescript-eslint/eslint-plugin');
3+
const vuePlugin = require('eslint-plugin-vue');
4+
const prettierPlugin = require('eslint-plugin-prettier');
5+
6+
/** @type {import("eslint").Linter.FlatConfig[]} */
7+
module.exports = [
8+
{
9+
ignores: ['node_modules/**', 'dist/**', 'types/**']
10+
},
11+
{
12+
files: ['**/*.ts'],
13+
languageOptions: {
14+
parser: tsParser,
15+
parserOptions: {
16+
ecmaVersion: 2021,
17+
sourceType: 'module'
18+
}
19+
},
20+
plugins: {
21+
'@typescript-eslint': tsPlugin,
22+
prettier: prettierPlugin
23+
},
24+
rules: {
25+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
26+
'prettier/prettier': 'warn'
27+
}
28+
},
29+
{
30+
files: ['**/*.vue'],
31+
languageOptions: {
32+
parser: tsParser,
33+
parserOptions: {
34+
ecmaVersion: 2021,
35+
sourceType: 'module',
36+
extraFileExtensions: ['.vue']
37+
}
38+
},
39+
plugins: {
40+
vue: vuePlugin,
41+
'@typescript-eslint': tsPlugin,
42+
prettier: prettierPlugin
43+
},
44+
rules: {
45+
'vue/multi-word-component-names': 'off',
46+
'prettier/prettier': 'warn'
47+
}
48+
}
49+
];

0 commit comments

Comments
 (0)