🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@annotorious/annotorious

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@annotorious/annotorious - npm Package Compare versions

Comparing version

to
3.0.0-rc.22

4

dist/annotation/utils/styling.d.ts

@@ -1,4 +0,4 @@

import type { DrawingStyle } from '@annotorious/core';
import type { DrawingStyleExpression } from '@annotorious/core';
import type { ImageAnnotation } from '../../model';
export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyle | ((a: ImageAnnotation) => DrawingStyle) | undefined) => string | undefined;
export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyleExpression<ImageAnnotation>) => string | undefined;
//# sourceMappingURL=styling.d.ts.map
import type { SvelteComponent } from 'svelte';
import { type Annotator } from '@annotorious/core';
import type { Annotator } from '@annotorious/core';
import { type DrawingTool } from './annotation/tools';

@@ -4,0 +4,0 @@ import type { DrawingToolOpts } from './annotation';

{
"name": "@annotorious/annotorious",
"version": "3.0.0-rc.21",
"version": "3.0.0-rc.22",
"description": "Add image annotation functionality to any web page with a few lines of JavaScript",

@@ -40,3 +40,3 @@ "author": "Rainer Simon",

"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@tsconfig/svelte": "^5.0.2",
"@tsconfig/svelte": "^5.0.4",
"@types/rbush": "^3.0.3",

@@ -46,4 +46,4 @@ "jsdom": "^24.0.0",

"svelte-preprocess": "^5.1.3",
"typescript": "^5.3.3",
"vite": "^5.2.2",
"typescript": "^5.4.3",
"vite": "^5.2.6",
"vite-plugin-dts": "^3.7.3",

@@ -53,6 +53,6 @@ "vitest": "^1.4.0"

"dependencies": {
"@annotorious/core": "^3.0.0-rc.20",
"@annotorious/core": "3.0.0-rc.22",
"rbush": "^3.0.1",
"uuid": "^9.0.1"
}
}
}

@@ -1,5 +0,8 @@

import type { DrawingStyle } from '@annotorious/core';
import type { DrawingStyleExpression } from '@annotorious/core';
import type { ImageAnnotation } from '../../model';
export const computeStyle = (annotation: ImageAnnotation, style?: DrawingStyle | ((a: ImageAnnotation) => DrawingStyle)) => {
export const computeStyle = (
annotation: ImageAnnotation,
style?: DrawingStyleExpression<ImageAnnotation>
) => {
const computed = typeof style === 'function' ? style(annotation) : style;

@@ -6,0 +9,0 @@

import type { SvelteComponent } from 'svelte';
import { PointerSelectAction, type Annotator, type DrawingStyle, type Filter, type User } from '@annotorious/core';
import { PointerSelectAction } from '@annotorious/core';
import type { Annotator, DrawingStyleExpression, Filter, User } from '@annotorious/core';
import { createAnonymousGuest, createBaseAnnotator, createLifecyleObserver, createUndoStack } from '@annotorious/core';

@@ -145,3 +146,3 @@ import { registerEditor } from './annotation/editors';

const setStyle = (style: DrawingStyle | ((annotation: ImageAnnotation) => DrawingStyle) | undefined) =>
const setStyle = (style: DrawingStyleExpression<ImageAnnotation> | undefined) =>
annotationLayer.$set({ style });

@@ -156,2 +157,6 @@

const setVisible = (visible: boolean) =>
// @ts-ignore
annotationLayer.$set({ visible });
return {

@@ -172,2 +177,3 @@ ...base,

setUser,
setVisible,
state

@@ -174,0 +180,0 @@ }

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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

Sorry, the diff of this file is not supported yet