
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
vue-marmoset-viewer
Advanced tools
A responsive and configurable Marmoset Viewer component for Vue.
A responsive and configurable Marmoset Viewer component for Vue.
v1.x.x supports Vue 2, while v2.0.0 and onward target Vue 3.
# yarn
$ yarn add vue-marmoset-viewer
# npm
$ npm install vue-marmoset-viewer
import { createApp } from 'vue'
import { MarmosetViewer } from 'vue-marmoset-viewer'
const app = createApp()
app.use(MarmosetViewer)
import Vue from 'vue'
import MarmosetViewer from 'vue-marmoset-viewer'
Vue.use(MarmosetViewer)
<template>
<marmoset-viewer
src="/file.mview"
:width="800"
:height="600"
:auto-start="true"
/>
</template>
or
<template>
<marmoset-viewer src="/file.mview" responsive />
</template>
If responsive
is set to true, the component will fill the available space of its parent.
Note: All properties of the component are reactive.
load
: Emitted when the underlying viewer is done loading.unload
: Emitted when an underlying viewer has been unloaded, because the component is destroyed or recreated.resize
: Emitted when the underlying viewer has been resized manually or automatically, when the responsive
property is set to true
.Nuxt 2 is not supported by v2.0.0 and onward.
plugins/marmosetViewer.ts
with the following content.import Vue from 'vue'
import MarmosetViewer from 'vue-marmoset-viewer'
Vue.use(MarmosetViewer)
plugins
array in nuxt.config.js
.export default {
plugins: [{ src: '~/plugins/marmosetViewer.ts' }],
}
In addition to the component, this library also allows for direct access of the Marmoset script.
After the Promise
returned by loadMarmoset()
is resolved, the script can be accessed at document.marmoset
.
While the required types are included in this library, keep in mind that this can only be done client-side, as it requires document
to be available.
The following options are available (taken from https://marmoset.co/posts/viewer-integration-guide/):
Type | Name | Default | Description |
---|---|---|---|
number | width | 800 | Width of viewer frame in points. This setting is ignored in full frame mode. |
number | height | 600 | Height of viewer frame in points. This setting is ignored in full frame mode. |
boolean | autoStart | false | Starts the viewer loading process immediately upon load (user does not have to press the play button). Leaving this disabled can save bandwidth and page load time. |
In addition, the following options can be set when embedding a Marmoset viewer manually.
Type | Name | Default | Description |
---|---|---|---|
boolean | fullFrame | false | When enabled, stretches the viewer rectangle to fill the available frame (the containing window or iframe). This setting is ignored when the “pagePreset” option is enabled. |
boolean | pagePreset | false | When enabled, constructs a full standalone web page around the viewer, with a resizable frame. Useful for creating a simple, decent-looking presentation without having to construct a page yourself. |
string | thumbnailURL | undefined | If supplied, this image URL will be used for the load screen instead of the thumbnail extracted from the mview file. For best results, ensure that the given URL will not cause a cross-origin conflict. |
# install dependencies
$ pnpm install
# build for production
$ pnpm build
# lint project files
$ pnpm lint
Please keep the license of the Marmoset Viewer, which will be loaded dynamically, in mind. The (current) license is as follows:
Copyright (c) Marmoset LLC.
All rights reserved.
Redistribution and use of this software are permitted provided
that the software remains whole and unmodified and this copyright
notice remains attached. Use or inclusion of any portion of this
code in other software programs is prohibited, excepting simple
embedding of this file in web applications. This software, or any
derivatives thereof, may not be resold, rented, leased, or
distributed on any other for-charge basis.
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
MIT - Copyright © Jan Müller
FAQs
A responsive and configurable Marmoset Viewer component for Vue.
The npm package vue-marmoset-viewer receives a total of 45 weekly downloads. As such, vue-marmoset-viewer popularity was classified as not popular.
We found that vue-marmoset-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.