Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wixc3/board-core

Package Overview
Dependencies
Maintainers
86
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/board-core - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

2

dist/create-renderable-base.d.ts
import type { IRenderableMetadataBase } from './types';
import { OmitGeneralMetadata } from './create-metadata';
export declare type OmitIRenderableMetadataBase<DATA extends IRenderableMetadataBase> = Omit<OmitGeneralMetadata<DATA>, 'setupStage' | 'cleanupStage'>;
export declare function baseRender<DATA extends IRenderableMetadataBase>(data: DATA, render: (target: HTMLElement) => Promise<void>, canvas: HTMLElement): Promise<void>;
export declare function baseRender<DATA extends IRenderableMetadataBase>(data: DATA, render: (target: HTMLElement) => Promise<() => void>, canvas: HTMLElement): Promise<() => void>;
export declare function createRenderableBase<DATA extends IRenderableMetadataBase>(data: OmitIRenderableMetadataBase<DATA>): DATA;
//# sourceMappingURL=create-renderable-base.d.ts.map

@@ -9,4 +9,5 @@ "use strict";

(0, hooks_1.callHooks)(data, 'beforeRender', canvas);
await render(canvas);
const cleanup = await render(canvas);
(0, hooks_1.callHooks)(data, 'afterRender', canvas);
return cleanup;
}

@@ -13,0 +14,0 @@ exports.baseRender = baseRender;

@@ -73,10 +73,8 @@ export declare type LayoutSize = number | undefined | null;

/**
* renders the Renderable into an html element
* Renders the Renderable into an html element
*
* @returns a cleanup function
*/
render: (targetElement: HTMLElement) => Promise<void>;
render: (targetElement: HTMLElement) => Promise<() => void>;
/**
* cleans everything render does
*/
cleanup: (targetElement: HTMLElement) => void;
/**
* sets the stage for the renderer.

@@ -83,0 +81,0 @@ * this function has many side effects ( such as effecting window styles and sizes )

{
"name": "@wixc3/board-core",
"description": "Types and helpers for component boards",
"version": "1.2.0",
"version": "2.0.0",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "files": [

@@ -13,8 +13,9 @@ import type { IRenderableMetadataBase } from './types';

data: DATA,
render: (target: HTMLElement) => Promise<void>,
render: (target: HTMLElement) => Promise<() => void>,
canvas: HTMLElement
): Promise<void> {
): Promise<() => void> {
callHooks<IRenderableMetadataBase, 'beforeRender'>(data, 'beforeRender', canvas);
await render(canvas);
const cleanup = await render(canvas);
callHooks<IRenderableMetadataBase, 'afterRender'>(data, 'afterRender', canvas);
return cleanup;
}

@@ -21,0 +22,0 @@

@@ -127,10 +127,8 @@ export type LayoutSize = number | undefined | null;

/**
* renders the Renderable into an html element
* Renders the Renderable into an html element
*
* @returns a cleanup function
*/
render: (targetElement: HTMLElement) => Promise<void>;
render: (targetElement: HTMLElement) => Promise<() => void>;
/**
* cleans everything render does
*/
cleanup: (targetElement: HTMLElement) => void;
/**
* sets the stage for the renderer.

@@ -137,0 +135,0 @@ * this function has many side effects ( such as effecting window styles and sizes )

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc