@linkurious/ogma-annotations 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -8
- package/dist/index.mjs +1040 -1015
- package/dist/types/index.d.ts +17 -3
- package/package.json +13 -23
package/dist/types/index.d.ts
CHANGED
|
@@ -14,10 +14,16 @@ import { Position } from 'geojson';
|
|
|
14
14
|
import { Size } from '@linkurious/ogma';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Adjusts the brightness of a color (hex or rgba) based on its perceived luminance.
|
|
18
|
+
* For bright colors, the adjustment is applied as darkening; for dark colors, as lightening.
|
|
19
|
+
*
|
|
18
20
|
* @param color - Color string in hex (#RRGGBB or #RGB) or rgba format
|
|
19
|
-
* @param amount -
|
|
20
|
-
*
|
|
21
|
+
* @param amount - Adjustment factor between -1 and 1:
|
|
22
|
+
* - Positive values (0 to 1): lighten dark colors, darken bright colors
|
|
23
|
+
* - Negative values (-1 to 0): darken dark colors, lighten bright colors
|
|
24
|
+
* - 0: no change
|
|
25
|
+
* - Example: 0.2 applies a 20% adjustment, -0.1 applies a -10% adjustment
|
|
26
|
+
* @returns Adjusted color in rgba format
|
|
21
27
|
*/
|
|
22
28
|
export declare function adjustColorBrightness(color: Color, amount: number): RgbaColor;
|
|
23
29
|
|
|
@@ -301,6 +307,10 @@ export declare interface CommentStyle extends TextStyle {
|
|
|
301
307
|
showSendButton?: boolean;
|
|
302
308
|
/** Auto-grow height with content (default: true) */
|
|
303
309
|
autoGrow?: boolean;
|
|
310
|
+
/** Show drop shadow on comment box (default: true) */
|
|
311
|
+
shadow?: boolean;
|
|
312
|
+
/** Expand to full width when selected (default: false) */
|
|
313
|
+
expandOnSelect?: boolean;
|
|
304
314
|
}
|
|
305
315
|
|
|
306
316
|
/**
|
|
@@ -1081,6 +1091,10 @@ export declare const defaultCommentOptions: Partial<CommentProps>;
|
|
|
1081
1091
|
* showSendButton: true,
|
|
1082
1092
|
* autoGrow: true,
|
|
1083
1093
|
*
|
|
1094
|
+
* // Visual effects
|
|
1095
|
+
* shadow: true,
|
|
1096
|
+
* expandOnSelect: false,
|
|
1097
|
+
*
|
|
1084
1098
|
* // Fixed size (always screen-aligned)
|
|
1085
1099
|
* fixedSize: true
|
|
1086
1100
|
* }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkurious/ogma-annotations",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Headless annotation plugin for Ogma",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"bump:minor": "bump2version minor && npm version --no-git-tag-version minor",
|
|
52
52
|
"bump:major": "bump2version major && npm version --no-git-tag-version major",
|
|
53
53
|
"build": "vite build",
|
|
54
|
-
"lint
|
|
55
|
-
"lint": "
|
|
54
|
+
"lint": "npx oxlint -c oxlint.json src",
|
|
55
|
+
"lint:ci": "mkdir -p reports && npx oxlint -c oxlint.json -f checkstyle src > reports/checkstyle.xml",
|
|
56
56
|
"types": "tsc --d -emitDeclarationOnly --outDir dist/types",
|
|
57
57
|
"preview": "vite preview",
|
|
58
58
|
"docs:build": "typedoc && node scripts/organize-sidebar.mjs",
|
|
@@ -70,19 +70,22 @@
|
|
|
70
70
|
"private": false,
|
|
71
71
|
"repository": {
|
|
72
72
|
"type": "git",
|
|
73
|
-
"url": "git+https://github.com/Linkurious/ogma-
|
|
73
|
+
"url": "git+https://github.com/Linkurious/ogma-annotations-control.git"
|
|
74
74
|
},
|
|
75
|
+
"homepage": "https://linkurious.github.io/ogma-annotations-control/",
|
|
75
76
|
"keywords": [
|
|
76
77
|
"annotations",
|
|
77
78
|
"headless",
|
|
78
79
|
"arrow",
|
|
79
80
|
"ogma",
|
|
80
|
-
"text"
|
|
81
|
+
"text",
|
|
82
|
+
"graph",
|
|
83
|
+
"visualization"
|
|
81
84
|
],
|
|
82
85
|
"author": "Linkurious SAS",
|
|
83
86
|
"license": "Apache-2.0",
|
|
84
87
|
"peerDependencies": {
|
|
85
|
-
"@linkurious/ogma": ">=
|
|
88
|
+
"@linkurious/ogma": ">=5.3.11"
|
|
86
89
|
},
|
|
87
90
|
"dependencies": {
|
|
88
91
|
"@borgar/textbox": "1.8.0",
|
|
@@ -93,7 +96,8 @@
|
|
|
93
96
|
"zustand": "5.0.7"
|
|
94
97
|
},
|
|
95
98
|
"devDependencies": {
|
|
96
|
-
"@linkurious/eslint-config-ogma": "1.0
|
|
99
|
+
"@linkurious/eslint-config-ogma": "2.1.0",
|
|
100
|
+
"oxlint": "0.16.0",
|
|
97
101
|
"@types/geojson": "7946.0.13",
|
|
98
102
|
"@types/rbush": "4.0.0",
|
|
99
103
|
"get-port": "7.0.0",
|
|
@@ -104,25 +108,11 @@
|
|
|
104
108
|
"typedoc-vitepress-theme": "1.1.2",
|
|
105
109
|
"typescript": "5.3.3",
|
|
106
110
|
"vanilla-colorful": "0.7.2",
|
|
107
|
-
"vite": "
|
|
111
|
+
"vite": "6.3.5",
|
|
108
112
|
"vite-plugin-dts": "^4.1.0",
|
|
109
|
-
"vitest": "
|
|
113
|
+
"vitest": "3.2.4",
|
|
110
114
|
"vitest-canvas-mock": "1.1.3"
|
|
111
115
|
},
|
|
112
|
-
"eslintConfig": {
|
|
113
|
-
"extends": [
|
|
114
|
-
"@linkurious/eslint-config-ogma"
|
|
115
|
-
],
|
|
116
|
-
"rules": {
|
|
117
|
-
"@typescript-eslint/no-unused-vars": [
|
|
118
|
-
"error",
|
|
119
|
-
{
|
|
120
|
-
"argsIgnorePattern": "^_",
|
|
121
|
-
"varsIgnorePattern": "^_"
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
116
|
"prettier": {
|
|
127
117
|
"printWidth": 80,
|
|
128
118
|
"trailingComma": "none"
|