Compare commits

..

No commits in common. "c78c6117b6f4f809a17ffa2cfb1a48d405cb5ce2" and "39513f2c560bc1b579ed51631c75059e9f28ab0e" have entirely different histories.

13 changed files with 3974 additions and 2559 deletions

33
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
<!-- Before posting your issue, please make sure it is not related to Electron or the `<webview>` tag by checking Electron issues (https://github.com/electron/electron/issues). -->
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Please complete the following information**
- OS: [e.g. iOS]
- electron-tabs version [e.g. 0.12.0]
- Electron version [e.g. 8.0.0]
**Code**
If your issue involves code, please consider creating a sample in a dedicated repository.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional information**
Add any other context about the problem here.

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1 @@
blank_issues_enabled: false

View file

@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.

16
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View file

@ -0,0 +1,16 @@
---
name: Question
about: Ask a specific question about electron-tabs
title: ''
labels: question
assignees: ''
---
<!--
IMPORTANT: before posting your question, please:
- Read electron-tabs documentation which normally contains everything you need to know: https://github.com/brrd/electron-tabs/blob/master/README.md
- Check Electron docs if you don't feel comfortable yet with Electron common concepts: https://www.electronjs.org/docs
- Make sure your question is specific enough. This issue tracker is not intended to provide tutorials about how to develop an entire application. ISSUES WHICH DON'T RESPECT THIS RULE WILL BE CLOSED WITHOUT AN ANSWER.
- Give details and code samples if relevant.
-->

39
LICENSE
View file

@ -1,28 +1,21 @@
MIT NON-AI License
MIT License
Copyright (c) 2016 Thomas Brouard
Copyright (c) 2025 SudoVanilla
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:
Permission is hereby granted, free of charge, to any person obtaining a copy of the 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 above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
In addition, the following restrictions apply:
1. The Software and any modifications made to it may not be used for the purpose of training or improving machine learning algorithms,
including but not limited to artificial intelligence, natural language processing, or data mining. This condition applies to any derivatives,
modifications, or updates based on the Software code. Any usage of the Software in an AI-training dataset is considered a breach of this License.
2. The Software may not be included in any dataset used for training or improving machine learning algorithms,
including but not limited to artificial intelligence, natural language processing, or data mining.
3. Any person or organization found to be in violation of these restrictions will be subject to legal action and may be held liable
for any damages resulting from such use.
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.
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.

View file

@ -77,8 +77,8 @@ Use `TabGroup` methods and manipulate tabs in a script after calling `electron-t
// Do stuff
const tab = tabGroup.addTab({
title: "electron-tabs | SudoVanilla Registry",
src: "https://npm.sudovanilla.org/-/web/detail/@sudovanilla/electron-tabs"
title: "electron-tabs on NPM",
src: "https://www.npmjs.com/package/electron-tabs"
});
const pos = tab.getPosition();
console.log("Tab position is " + pos);
@ -100,7 +100,7 @@ Add a new tab and returns the related `Tab` instance.
* `visible` (default: `true`): set this to `false` if you don't want to display the tab once it is loaded. If set to `false` then you will need to call `tab.show()` to display the tab.
* `active` (default: `false`): set this to `true` if you want to activate the tab once it is loaded. Otherwise you will need to call `tab.activate()`.
* `ready`: a callback function to call once the tab is ready. The `Tab` instance is passed as the only parameter.
* `webviewAttributes`: attributes to add to the webview tag. See [webview documentation](https://www.electronjs.org/docs/latest/api/webview-tag#tag-attributes).
* `webviewAttributes`: attributes to add to the webview tag. See [webview documentation](http://electron.atom.io/docs/api/web-view-tag/#tag-attributes).
#### `tabGroup.setDefaultTab(options)`
@ -247,7 +247,7 @@ webview.loadURL("file://path/to/new/page.html");
## Custom styles
To customize tab-group styles, set new values to [electron-tabs CSS variables](https://ark.sudovanilla.org/Korbs/electron-tabs/blob/master/src/style.css) in your application stylesheet.
To customize tab-group styles, set new values to [electron-tabs CSS variables](https://github.com/brrd/electron-tabs/blob/master/src/style.css) in your application stylesheet.
Since `TabGroup` is a Web Component you won't be able to change its styles directly from your app stylesheet. If you need more control over it then you can add a `<style>` tag inside the `<tab-group >` element:
@ -311,7 +311,7 @@ Git and Node 12+.
```bash
# Clone this repo
git clone git@ark.sudovanilla.org:korbs/electron-tabs.git
git clone git@github.com:brrd/electron-tabs.git
cd electron-tabs
# Install dependencies
@ -332,4 +332,4 @@ npm run demo
## License
The MIT License (MIT NON-AI License) - Copyright (c) 2022 Thomas Brouard, Copyright (c) 2025 SudoVanilla
The MIT License (MIT) - Copyright (c) 2022 Thomas Brouard

File diff suppressed because one or more lines are too long

441
dist/electron-tabs.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

3607
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{
"name": "@sudovanilla/electron-tabs",
"version": "1.3.0",
"version": "1.1.0",
"description": "Simple tabs for Electron applications",
"main": "dist/electron-tabs.js",
"types": "dist/electron-tabs.d.ts",
@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
"url": "https://ark.sudovanilla.org/Korbs/electron-tabs"
"url": "https://github.com/brrd/electron-tabs"
},
"scripts": {
"demo": "electron ./demo",
@ -32,10 +32,10 @@
"@parcel/transformer-inline-string": "^2.5.0",
"@parcel/transformer-typescript-types": "^2.5.0",
"@types/sortablejs": "^1.13.0",
"electron": "^33.2.1",
"electron": "^17.1.2",
"parcel": "^2.5.0",
"postcss": "^8.4.14",
"sortablejs": "^1.15.0",
"typescript": "^5.7.2"
"typescript": "^4.7.2"
}
}

View file

@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "ES2023",
"target": "es2021",
"noImplicitAny": true,
"noUnusedParameters": false,
"allowSyntheticDefaultImports": true

2111
yarn.lock

File diff suppressed because it is too large Load diff