![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@verygoodgraphics/vgg-sdk
Advanced tools
Readme
vgg-sdk is VGG SDK for JavaScript.
Use this sdk, developers can call vgg runtime api, edit vgg model, etc.
import { DesignDocument } from '@verygoodgraphics/vgg-sdk';
import { VggFormat, Color, GraphicsContextSettings1, Style, Fill } from '@verygoodgraphics/vgg-sdk/dist/design_document_types'
async function testAddColor() {
// Given
const doc = await DesignDocument.getDesignDocument() as VggFormat;
let theStyle: Style = doc.artboard[0].layers[0].childObjects[0].style;
let newColor: Color = { class: 'color', alpha: 0.5, red: 0.5, green: 0.5, blue: 0.5 };
let contextSetting: GraphicsContextSettings1 = {
class: 'graphicsContextSettings',
blendMode: 0,
opacity: 0.5,
isolateBlending: true,
transparencyKnockoutGroup: 0
};
let aFill: Fill = {
class: 'fill', isEnabled: true, color: newColor, fillType: 0,
contextSettings: contextSetting
};
// When
try {
theStyle.fills.push(aFill);
}
catch (error) {
console.log("error: ", error);
}
// Then
console.log("document now is: ", doc);
}
testAddColor();
import { DesignDocument, EventListenerNode } from '@verygoodgraphics/vgg-sdk';
import { VggFormat } from '@verygoodgraphics/vgg-sdk/dist/design_document_types'
async function test() {
// Given
const doc = await DesignDocument.getDesignDocument() as VggFormat;
let tmpNode: any = doc.artboard[0].layers[0].childObjects[0];
let node: EventListenerNode = tmpNode;
// When
const listener_code = 'console.log("hello")';
const event_type = 'click';
// When
node.addEventListener(event_type, listener_code);
// Then
let listeners = node.getEventListeners();
console.log('listeners after adding are: ', listeners);
if (listeners[event_type][0].listener !== listener_code) {
throw new Error('add or get failed');
}
// When
node.removeEventListener(event_type, listener_code);
listeners = node.getEventListeners();
console.log('listeners after removal are: ', listeners);
if (listeners[event_type].length !== 0) {
throw new Error('remove failed');
}
}
test();
FAQs
vgg-sdk is [VGG](https://verygoodgraphics.com/) SDK for JavaScript.
The npm package @verygoodgraphics/vgg-sdk receives a total of 0 weekly downloads. As such, @verygoodgraphics/vgg-sdk popularity was classified as not popular.
We found that @verygoodgraphics/vgg-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.