@figspec/react
Advanced tools
Comparing version 1.0.3 to 2.0.0
import { FigspecFrameViewer as FigspecFrameViewerElement, FigspecFileViewer as FigspecFileViewerElement } from "@figspec/components"; | ||
import * as React from "react"; | ||
declare type FigspecFrameViewerElementProps = Pick<FigspecFrameViewerElement, "nodes" | "renderedImage"> & Partial<Pick<FigspecFrameViewerElement, "id" | "className" | "style" | "zoomSpeed" | "panSpeed" | "zoomMargin" | "link">>; | ||
export declare type FigspecPreferences = FigspecFileViewerElement["preferences"]; | ||
declare type FigspecFrameViewerElementProps = Pick<FigspecFrameViewerElement, "apiResponse" | "renderedImage"> & Partial<Pick<FigspecFrameViewerElement, "id" | "className" | "style" | "link" | "preferences">>; | ||
interface FigspecFrameViewerEvents { | ||
onScaleChange?(ev: CustomEvent<{ | ||
scale: number; | ||
}>): void; | ||
onPositionChange?(ev: CustomEvent<{ | ||
x: number; | ||
y: number; | ||
}>): void; | ||
onNodeSelect?(ev: CustomEvent<{ | ||
selectedNode: unknown | null; | ||
}>): void; | ||
onPreferencesUpdate?(ev: CustomEvent<{ | ||
preferences: FigspecPreferences; | ||
}>): void; | ||
} | ||
export declare type FigspecFrameViewerProps = FigspecFrameViewerElementProps & FigspecFrameViewerEvents; | ||
export declare const FigspecFrameViewer: React.ForwardRefExoticComponent<Pick<FigspecFrameViewerElement, "nodes" | "renderedImage"> & Partial<Pick<FigspecFrameViewerElement, "className" | "id" | "style" | "zoomMargin" | "link" | "zoomSpeed" | "panSpeed">> & FigspecFrameViewerEvents & React.RefAttributes<FigspecFrameViewerElement>>; | ||
declare type FigspecFileViewerElementProps = Pick<FigspecFileViewerElement, "documentNode" | "renderedImages"> & Partial<Pick<FigspecFileViewerElement, "id" | "className" | "style" | "zoomSpeed" | "panSpeed" | "zoomMargin" | "link">>; | ||
export declare const FigspecFrameViewer: React.ForwardRefExoticComponent<Pick<FigspecFrameViewerElement, "apiResponse" | "renderedImage"> & Partial<Pick<FigspecFrameViewerElement, "preferences" | "link" | "className" | "id" | "style">> & FigspecFrameViewerEvents & React.RefAttributes<FigspecFrameViewerElement>>; | ||
declare type FigspecFileViewerElementProps = Pick<FigspecFileViewerElement, "apiResponse" | "renderedImages"> & Partial<Pick<FigspecFileViewerElement, "id" | "className" | "style" | "link" | "preferences">>; | ||
interface FigspecFileViewerEvents { | ||
onScaleChange?(ev: CustomEvent<{ | ||
scale: number; | ||
}>): void; | ||
onPositionChange?(ev: CustomEvent<{ | ||
x: number; | ||
y: number; | ||
}>): void; | ||
onNodeSelect?(ev: CustomEvent<{ | ||
selectedNode: unknown | null; | ||
}>): void; | ||
onPreferencesUpdate?(ev: CustomEvent<{ | ||
preferences: FigspecPreferences; | ||
}>): void; | ||
} | ||
export declare type FigspecFileViewerProps = FigspecFileViewerElementProps & FigspecFileViewerEvents; | ||
export declare const FigspecFileViewer: React.ForwardRefExoticComponent<Pick<FigspecFileViewerElement, "documentNode" | "renderedImages"> & Partial<Pick<FigspecFileViewerElement, "className" | "id" | "style" | "zoomMargin" | "link" | "zoomSpeed" | "panSpeed">> & FigspecFileViewerEvents & React.RefAttributes<FigspecFileViewerElement>>; | ||
export declare const FigspecFileViewer: React.ForwardRefExoticComponent<Pick<FigspecFileViewerElement, "apiResponse" | "renderedImages"> & Partial<Pick<FigspecFileViewerElement, "preferences" | "link" | "className" | "id" | "style">> & FigspecFileViewerEvents & React.RefAttributes<FigspecFileViewerElement>>; | ||
export {}; |
@@ -9,11 +9,19 @@ import { FigspecFrameViewer as FigspecFrameViewerElement, FigspecFileViewer as FigspecFileViewerElement, } from "@figspec/components"; | ||
// every properties turns into optional. | ||
export const FigspecFrameViewer = createComponent(React, "figspec-frame-viewer", FigspecFrameViewerElement, { | ||
onNodeSelect: "nodeselect", | ||
onPositionChange: "positionchange", | ||
onScaleChange: "scalechange", | ||
export const FigspecFrameViewer = createComponent({ | ||
react: React, | ||
tagName: "figspec-frame-viewer", | ||
elementClass: FigspecFrameViewerElement, | ||
events: { | ||
onNodeSelect: "nodeselect", | ||
onPreferencesUpdate: "preferencesupdate", | ||
}, | ||
}); | ||
export const FigspecFileViewer = createComponent(React, "figspec-file-viewer", FigspecFileViewerElement, { | ||
onNodeSelect: "nodeselect", | ||
onPositionChange: "positionchange", | ||
onScaleChange: "scalechange", | ||
export const FigspecFileViewer = createComponent({ | ||
react: React, | ||
tagName: "figspec-file-viewer", | ||
elementClass: FigspecFileViewerElement, | ||
events: { | ||
onNodeSelect: "nodeselect", | ||
onPreferencesUpdate: "preferencesupdate", | ||
}, | ||
}); |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "1.0.3", | ||
"version": "2.0.0", | ||
"contributors": [ | ||
@@ -21,17 +21,15 @@ { | ||
"license": "MIT", | ||
"module": "esm/es2015/index.js", | ||
"main": "cjs/es2016/index.js", | ||
"browser": "esm/es2015/index.js", | ||
"main": "esm/es2015/index.js", | ||
"type": "module", | ||
"types": "esm/es2015/index.d.ts", | ||
"files": [ | ||
"esm", | ||
"cjs" | ||
"esm" | ||
], | ||
"sideEffects": [ | ||
"./src/index.ts", | ||
"./{cjs,esm}/*/index.js" | ||
"./esm/*/index.js" | ||
], | ||
"dependencies": { | ||
"@figspec/components": "^1.0.1", | ||
"@lit-labs/react": "^1.0.2" | ||
"@figspec/components": "^2.0.1", | ||
"@lit-labs/react": "^2.0.0" | ||
}, | ||
@@ -59,6 +57,3 @@ "peerDependencies": { | ||
"scripts": { | ||
"build:esm": "tsc --outDir esm/es2015", | ||
"build:cjs": "tsc --outDir cjs/es2016 --target es2016 --module CommonJS", | ||
"build:default": "yarn build:esm && yarn build:cjs", | ||
"build": "yarn build:default", | ||
"build": "tsc --outDir esm/es2015", | ||
"storybook": "start-storybook -p 6007", | ||
@@ -65,0 +60,0 @@ "build-storybook": "build-storybook", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
6690
5
54
+ Added@figspec/components@2.0.4(transitive)
+ Added@lit-labs/react@2.1.3(transitive)
+ Added@lit/react@1.0.6(transitive)
+ Added@types/prop-types@15.7.13(transitive)
+ Added@types/react@18.3.12(transitive)
+ Addedcsstype@3.1.3(transitive)
- Removed@figspec/components@1.0.3(transitive)
- Removed@lit-labs/react@1.2.1(transitive)
- Removed@lit-labs/ssr-dom-shim@1.2.1(transitive)
- Removed@lit/reactive-element@1.6.3(transitive)
- Removed@types/trusted-types@2.0.7(transitive)
- Removedlit@2.8.0(transitive)
- Removedlit-element@3.3.3(transitive)
- Removedlit-html@2.8.0(transitive)
Updated@figspec/components@^2.0.1
Updated@lit-labs/react@^2.0.0