-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add PreviewBounds component, written with Vue
- Loading branch information
Showing
11 changed files
with
401 additions
and
0 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
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
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 @@ | ||
from trame_client.widgets.core import HtmlElement | ||
|
||
|
||
class PreviewBounds(HtmlElement): | ||
def __init__(self, children=None, **kwargs): | ||
super().__init__("preview-bounds", children, **kwargs) | ||
self._attr_names += [ | ||
"preview", | ||
"axes", | ||
"coordinates", | ||
] | ||
self._event_names += [ | ||
("update_bounds", "update-bounds"), | ||
] |
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,12 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
"plugin:vue/vue3-essential", | ||
"eslint:recommended", | ||
"@vue/eslint-config-prettier", | ||
], | ||
parserOptions: { | ||
ecmaVersion: "latest", | ||
}, | ||
}; |
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,7 @@ | ||
serve | ||
serve/*.map | ||
serve/*.html | ||
serve/*.common.* | ||
serve/*-light.* | ||
serve/*.umd.js | ||
package-lock.json |
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,13 @@ | ||
from pathlib import Path | ||
|
||
# Compute local path to serve | ||
serve_path = str(Path(__file__).parent.with_name("serve").resolve()) | ||
|
||
# Serve directory for JS/CSS files | ||
serve = {"__pan3d_components": serve_path} | ||
|
||
# List of JS files to load (usually from the serve path above) | ||
scripts = ["__pan3d_components/pan3d-components.umd.js"] | ||
|
||
# List of Vue plugins to install/load | ||
vue_use = ["pan3d_components"] |
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": "pan3d-components", | ||
"version": "0.0.0", | ||
"description": "Vue component for pan3d", | ||
"main": "./dist/pan3d-components.umd.js", | ||
"unpkg": "./dist/pan3d-components.umd.js", | ||
"exports": { | ||
".": { | ||
"require": "./dist/pan3d-components.umd.js" | ||
} | ||
}, | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build --emptyOutDir", | ||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore --ignore-pattern public", | ||
"semantic-release": "semantic-release" | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": { | ||
"vue": "^2.7.0 || >=3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@vue/eslint-config-prettier": "^7.0.0", | ||
"eslint": "^8.33.0", | ||
"eslint-plugin-vue": "^9.3.0", | ||
"prettier": "^2.7.1", | ||
"vite": "^4.1.0", | ||
"vue": "^3.0.0" | ||
}, | ||
"author": "Kitware Inc", | ||
"license": "MIT", | ||
"keywords": [ | ||
"Kitware", | ||
"pan3d" | ||
], | ||
"files": [ | ||
"dist/*", | ||
"src/*", | ||
"*.json", | ||
"*.js" | ||
] | ||
} |
Oops, something went wrong.