@genome-spy/app 0.84.0 → 0.86.0
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/README.md +28 -0
- package/dist/{agentApi-DHXYZVvQ.js → agentApi-DgopQbMV.js} +5804 -7009
- package/dist/agentApi.es.js +2823 -2594
- package/dist/agentShared.es.js +15 -14
- package/dist/canvas2d-8uxuN_vx.js +619 -0
- package/dist/canvas2d-BtQC7Xr8.js +619 -0
- package/dist/canvasSizeHelper-7h_8rOcx.js +56 -0
- package/dist/clipOptions-BQfNhxgP.js +2239 -0
- package/dist/clipOptions-taFzEljc.js +2259 -0
- package/dist/{debug-aHQsa6hU.js → debug-Bzc3SoRg.js} +8 -8
- package/dist/{debug-D6FqxKEj.js → debug-D_VtWQ6l.js} +8 -8
- package/dist/{esm-CGLz7idZ.js → esm-BA6yMcc-.js} +438 -434
- package/dist/{esm-D8vvQAP3.js → esm-CcDLRSvC.js} +33 -33
- package/dist/{esm-BeV56E_5.js → esm-CfYZhLHN.js} +33 -33
- package/dist/{esm-DQ3lJSQN.js → esm-JAiZmFIS.js} +1 -1
- package/dist/index.es.js +3067 -2987
- package/dist/index.js +2030 -2022
- package/dist/indexer-qiFctgR3.js +72 -0
- package/dist/indexer-qy_dq5l5.js +72 -0
- package/dist/layoutResult-D50MSHXR.js +97 -0
- package/dist/nativeText-DFV5XIx8.js +860 -0
- package/dist/nativeText-vT3AWE14.js +860 -0
- package/dist/performanceProfiler-CPLEjApa.js +20 -0
- package/dist/rasterExport-B8pVoOsj.js +44 -0
- package/dist/rasterExport-C4r4xjQT.js +44 -0
- package/dist/rasterImage-B4rPLaW9.js +18 -0
- package/dist/rasterization-CFogVB3B.js +50 -0
- package/dist/rectangle-DKnrAmKs.js +142 -0
- package/dist/renderCanvas2D-BQrRWp2Z.js +271 -0
- package/dist/renderCanvas2D-CHVNfIUz.js +271 -0
- package/dist/schema.json +1559 -219
- package/dist/style.css +1 -1
- package/dist/svg-C-Sw6E6G.js +1167 -0
- package/dist/svg-CKHwwKRt.js +1167 -0
- package/dist/{svgNumber-C6aRPc8Z.js → svgNumber-DNxESJQB.js} +1 -1
- package/dist/svgRasterizer-BgD72AmG.js +40 -0
- package/dist/svgRasterizer-BgSNqI3L.js +40 -0
- package/dist/vega-scale-CK0_al6O.js +2700 -0
- package/dist/vega-scale-D46-iCaL.js +2700 -0
- package/dist/viewError-BiR9VCgL.js +29 -0
- package/dist/{viewIdentityRegistry-Dl7rR4Ay.js → viewIdentityRegistry-B-VGlez1.js} +1 -1
- package/dist/{viewIdentityRegistry-AEQpJTDm.js → viewIdentityRegistry-CDtVktJD.js} +1 -1
- package/dist/viewSelectors-CKfxF_LM.js +1817 -0
- package/dist/viewSelectors-D_imtq5Z.js +1817 -0
- package/dist/viewUtils-nCJ7AoaI.js +5782 -0
- package/dist/warning-CpIIpk8e.js +7 -0
- package/dist/webgl-BaA3jSa2.js +4128 -0
- package/dist/webgl-FP-4EsBL.js +4128 -0
- package/package.json +7 -6
- package/dist/bmFontMetrics-CuNB-kNN.js +0 -31
- package/dist/clipOptions-Dqco1p8b.js +0 -377
- package/dist/framebufferReadback-Bje9lHb7.js +0 -1993
- package/dist/framebufferReadback-CC0D6Haw.js +0 -147
- package/dist/raster-9uKYMjHZ.js +0 -53
- package/dist/raster-BofBWXbe.js +0 -54
- package/dist/svg-CvsT1Y2V.js +0 -1793
- package/dist/svg-DRgWfcsL.js +0 -1793
- package/dist/twgl-full.module-BNEMlXRV.js +0 -1849
- package/dist/viewRenderingContext-HtpqwS_x.js +0 -120
- package/dist/viewSelectors-BhW4mTR1.js +0 -6386
- package/dist/viewSelectors-Bwzj10Qz.js +0 -6363
- package/dist/viewUtils-DMNiWslc.js +0 -7228
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"homepage": "https://genomespy.app/",
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.86.0",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"module": "dist/index.es.js",
|
|
14
14
|
"type": "module",
|
|
@@ -56,11 +56,12 @@
|
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"dev": "node dev-server.mjs",
|
|
59
|
-
"build": "rm -rf dist && mkdir -p dist && vite build && vite build --config vite.agent-subpaths.config.js && npm run build:schema",
|
|
59
|
+
"build": "rm -rf dist && mkdir -p dist && vite build && vite build --config vite.agent-subpaths.config.js && npm run build:schema && node scripts/verifyProductionBundle.mjs",
|
|
60
60
|
"build:schema": "mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.d.ts' --type AppRootSpec > dist/schema.json",
|
|
61
61
|
"test:tsc": "npm run test:tsc:src && npm run test:tsc:tests",
|
|
62
62
|
"test:tsc:src": "tsc -p tsconfig.json --noEmit",
|
|
63
63
|
"test:tsc:tests": "tsc -p tsconfig.tests.json --noEmit",
|
|
64
|
+
"smoke:examples:webgpu": "node ../core/scripts/runWebGpuExamples.mjs --scope app --all --compare-webgl",
|
|
64
65
|
"storybook": "storybook dev -p 6006",
|
|
65
66
|
"build-storybook": "storybook build",
|
|
66
67
|
"prepublishOnly": "npm run build"
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"@fortawesome/fontawesome-free": "^6.4.2",
|
|
71
72
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
|
72
73
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
|
73
|
-
"@genome-spy/core": "^0.
|
|
74
|
+
"@genome-spy/core": "^0.86.0",
|
|
74
75
|
"@reduxjs/toolkit": "^2.11.0",
|
|
75
76
|
"d3-color": "^3.1.0",
|
|
76
77
|
"idb": "^7.1.1",
|
|
@@ -83,8 +84,8 @@
|
|
|
83
84
|
"zarrita": "^0.6.1"
|
|
84
85
|
},
|
|
85
86
|
"devDependencies": {
|
|
86
|
-
"@genome-spy/app-agent": "^0.
|
|
87
|
-
"@genome-spy/inspector": "^0.
|
|
87
|
+
"@genome-spy/app-agent": "^0.86.0",
|
|
88
|
+
"@genome-spy/inspector": "^0.86.0"
|
|
88
89
|
},
|
|
89
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "d90789e619350444c0cb12b611d09fb0a0587de1"
|
|
90
91
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
function e(e) {
|
|
2
|
-
let t = [];
|
|
3
|
-
for (let e = 0; e <= 127; e++) t.push(void 0);
|
|
4
|
-
let n = /* @__PURE__ */ new Map();
|
|
5
|
-
for (let r of e.chars) r.id <= 127 ? t[r.id] = r : n.set(r.id, r);
|
|
6
|
-
let r = 8722;
|
|
7
|
-
n.has(r) || n.set(r, t[45]);
|
|
8
|
-
function i(e) {
|
|
9
|
-
return (e <= 127 ? t[e] : n.get(e)) || t[63];
|
|
10
|
-
}
|
|
11
|
-
function a(e) {
|
|
12
|
-
return i(e.charCodeAt(0));
|
|
13
|
-
}
|
|
14
|
-
let o = e.common.base, s = a("x"), c = a("X"), l = a("q"), u = s.height - 10, d = c.height - 10, f = l.height - s.height + l.yoffset - s.yoffset;
|
|
15
|
-
function p(e, t = 1) {
|
|
16
|
-
let n = 0;
|
|
17
|
-
for (let t = 0; t < e.length; t++) n += i(e.charCodeAt(t)).xadvance;
|
|
18
|
-
return n / o * t;
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
measureWidth: p,
|
|
22
|
-
getCharByCode: i,
|
|
23
|
-
getChar: a,
|
|
24
|
-
xHeight: u,
|
|
25
|
-
capHeight: d,
|
|
26
|
-
descent: f,
|
|
27
|
-
common: e.common
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { e as t };
|
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/internmap/src/index.js
|
|
2
|
-
var e = class extends Map {
|
|
3
|
-
constructor(e, t = i) {
|
|
4
|
-
if (super(), Object.defineProperties(this, {
|
|
5
|
-
_intern: { value: /* @__PURE__ */ new Map() },
|
|
6
|
-
_key: { value: t }
|
|
7
|
-
}), e != null) for (let [t, n] of e) this.set(t, n);
|
|
8
|
-
}
|
|
9
|
-
get(e) {
|
|
10
|
-
return super.get(t(this, e));
|
|
11
|
-
}
|
|
12
|
-
has(e) {
|
|
13
|
-
return super.has(t(this, e));
|
|
14
|
-
}
|
|
15
|
-
set(e, t) {
|
|
16
|
-
return super.set(n(this, e), t);
|
|
17
|
-
}
|
|
18
|
-
delete(e) {
|
|
19
|
-
return super.delete(r(this, e));
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
function t({ _intern: e, _key: t }, n) {
|
|
23
|
-
let r = t(n);
|
|
24
|
-
return e.has(r) ? e.get(r) : n;
|
|
25
|
-
}
|
|
26
|
-
function n({ _intern: e, _key: t }, n) {
|
|
27
|
-
let r = t(n);
|
|
28
|
-
return e.has(r) ? e.get(r) : (e.set(r, n), n);
|
|
29
|
-
}
|
|
30
|
-
function r({ _intern: e, _key: t }, n) {
|
|
31
|
-
let r = t(n);
|
|
32
|
-
return e.has(r) && (n = e.get(r), e.delete(r)), n;
|
|
33
|
-
}
|
|
34
|
-
function i(e) {
|
|
35
|
-
return typeof e == "object" && e ? e.valueOf() : e;
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region ../../node_modules/d3-color/src/define.js
|
|
39
|
-
function a(e, t, n) {
|
|
40
|
-
e.prototype = t.prototype = n, n.constructor = e;
|
|
41
|
-
}
|
|
42
|
-
function o(e, t) {
|
|
43
|
-
var n = Object.create(e.prototype);
|
|
44
|
-
for (var r in t) n[r] = t[r];
|
|
45
|
-
return n;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region ../../node_modules/d3-color/src/color.js
|
|
49
|
-
function s() {}
|
|
50
|
-
var c = .7, l = 1 / c, u = "\\s*([+-]?\\d+)\\s*", d = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", f = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", p = /^#([0-9a-f]{3,8})$/, m = RegExp(`^rgb\\(${u},${u},${u}\\)$`), h = RegExp(`^rgb\\(${f},${f},${f}\\)$`), g = RegExp(`^rgba\\(${u},${u},${u},${d}\\)$`), _ = RegExp(`^rgba\\(${f},${f},${f},${d}\\)$`), v = RegExp(`^hsl\\(${d},${f},${f}\\)$`), y = RegExp(`^hsla\\(${d},${f},${f},${d}\\)$`), b = {
|
|
51
|
-
aliceblue: 15792383,
|
|
52
|
-
antiquewhite: 16444375,
|
|
53
|
-
aqua: 65535,
|
|
54
|
-
aquamarine: 8388564,
|
|
55
|
-
azure: 15794175,
|
|
56
|
-
beige: 16119260,
|
|
57
|
-
bisque: 16770244,
|
|
58
|
-
black: 0,
|
|
59
|
-
blanchedalmond: 16772045,
|
|
60
|
-
blue: 255,
|
|
61
|
-
blueviolet: 9055202,
|
|
62
|
-
brown: 10824234,
|
|
63
|
-
burlywood: 14596231,
|
|
64
|
-
cadetblue: 6266528,
|
|
65
|
-
chartreuse: 8388352,
|
|
66
|
-
chocolate: 13789470,
|
|
67
|
-
coral: 16744272,
|
|
68
|
-
cornflowerblue: 6591981,
|
|
69
|
-
cornsilk: 16775388,
|
|
70
|
-
crimson: 14423100,
|
|
71
|
-
cyan: 65535,
|
|
72
|
-
darkblue: 139,
|
|
73
|
-
darkcyan: 35723,
|
|
74
|
-
darkgoldenrod: 12092939,
|
|
75
|
-
darkgray: 11119017,
|
|
76
|
-
darkgreen: 25600,
|
|
77
|
-
darkgrey: 11119017,
|
|
78
|
-
darkkhaki: 12433259,
|
|
79
|
-
darkmagenta: 9109643,
|
|
80
|
-
darkolivegreen: 5597999,
|
|
81
|
-
darkorange: 16747520,
|
|
82
|
-
darkorchid: 10040012,
|
|
83
|
-
darkred: 9109504,
|
|
84
|
-
darksalmon: 15308410,
|
|
85
|
-
darkseagreen: 9419919,
|
|
86
|
-
darkslateblue: 4734347,
|
|
87
|
-
darkslategray: 3100495,
|
|
88
|
-
darkslategrey: 3100495,
|
|
89
|
-
darkturquoise: 52945,
|
|
90
|
-
darkviolet: 9699539,
|
|
91
|
-
deeppink: 16716947,
|
|
92
|
-
deepskyblue: 49151,
|
|
93
|
-
dimgray: 6908265,
|
|
94
|
-
dimgrey: 6908265,
|
|
95
|
-
dodgerblue: 2003199,
|
|
96
|
-
firebrick: 11674146,
|
|
97
|
-
floralwhite: 16775920,
|
|
98
|
-
forestgreen: 2263842,
|
|
99
|
-
fuchsia: 16711935,
|
|
100
|
-
gainsboro: 14474460,
|
|
101
|
-
ghostwhite: 16316671,
|
|
102
|
-
gold: 16766720,
|
|
103
|
-
goldenrod: 14329120,
|
|
104
|
-
gray: 8421504,
|
|
105
|
-
green: 32768,
|
|
106
|
-
greenyellow: 11403055,
|
|
107
|
-
grey: 8421504,
|
|
108
|
-
honeydew: 15794160,
|
|
109
|
-
hotpink: 16738740,
|
|
110
|
-
indianred: 13458524,
|
|
111
|
-
indigo: 4915330,
|
|
112
|
-
ivory: 16777200,
|
|
113
|
-
khaki: 15787660,
|
|
114
|
-
lavender: 15132410,
|
|
115
|
-
lavenderblush: 16773365,
|
|
116
|
-
lawngreen: 8190976,
|
|
117
|
-
lemonchiffon: 16775885,
|
|
118
|
-
lightblue: 11393254,
|
|
119
|
-
lightcoral: 15761536,
|
|
120
|
-
lightcyan: 14745599,
|
|
121
|
-
lightgoldenrodyellow: 16448210,
|
|
122
|
-
lightgray: 13882323,
|
|
123
|
-
lightgreen: 9498256,
|
|
124
|
-
lightgrey: 13882323,
|
|
125
|
-
lightpink: 16758465,
|
|
126
|
-
lightsalmon: 16752762,
|
|
127
|
-
lightseagreen: 2142890,
|
|
128
|
-
lightskyblue: 8900346,
|
|
129
|
-
lightslategray: 7833753,
|
|
130
|
-
lightslategrey: 7833753,
|
|
131
|
-
lightsteelblue: 11584734,
|
|
132
|
-
lightyellow: 16777184,
|
|
133
|
-
lime: 65280,
|
|
134
|
-
limegreen: 3329330,
|
|
135
|
-
linen: 16445670,
|
|
136
|
-
magenta: 16711935,
|
|
137
|
-
maroon: 8388608,
|
|
138
|
-
mediumaquamarine: 6737322,
|
|
139
|
-
mediumblue: 205,
|
|
140
|
-
mediumorchid: 12211667,
|
|
141
|
-
mediumpurple: 9662683,
|
|
142
|
-
mediumseagreen: 3978097,
|
|
143
|
-
mediumslateblue: 8087790,
|
|
144
|
-
mediumspringgreen: 64154,
|
|
145
|
-
mediumturquoise: 4772300,
|
|
146
|
-
mediumvioletred: 13047173,
|
|
147
|
-
midnightblue: 1644912,
|
|
148
|
-
mintcream: 16121850,
|
|
149
|
-
mistyrose: 16770273,
|
|
150
|
-
moccasin: 16770229,
|
|
151
|
-
navajowhite: 16768685,
|
|
152
|
-
navy: 128,
|
|
153
|
-
oldlace: 16643558,
|
|
154
|
-
olive: 8421376,
|
|
155
|
-
olivedrab: 7048739,
|
|
156
|
-
orange: 16753920,
|
|
157
|
-
orangered: 16729344,
|
|
158
|
-
orchid: 14315734,
|
|
159
|
-
palegoldenrod: 15657130,
|
|
160
|
-
palegreen: 10025880,
|
|
161
|
-
paleturquoise: 11529966,
|
|
162
|
-
palevioletred: 14381203,
|
|
163
|
-
papayawhip: 16773077,
|
|
164
|
-
peachpuff: 16767673,
|
|
165
|
-
peru: 13468991,
|
|
166
|
-
pink: 16761035,
|
|
167
|
-
plum: 14524637,
|
|
168
|
-
powderblue: 11591910,
|
|
169
|
-
purple: 8388736,
|
|
170
|
-
rebeccapurple: 6697881,
|
|
171
|
-
red: 16711680,
|
|
172
|
-
rosybrown: 12357519,
|
|
173
|
-
royalblue: 4286945,
|
|
174
|
-
saddlebrown: 9127187,
|
|
175
|
-
salmon: 16416882,
|
|
176
|
-
sandybrown: 16032864,
|
|
177
|
-
seagreen: 3050327,
|
|
178
|
-
seashell: 16774638,
|
|
179
|
-
sienna: 10506797,
|
|
180
|
-
silver: 12632256,
|
|
181
|
-
skyblue: 8900331,
|
|
182
|
-
slateblue: 6970061,
|
|
183
|
-
slategray: 7372944,
|
|
184
|
-
slategrey: 7372944,
|
|
185
|
-
snow: 16775930,
|
|
186
|
-
springgreen: 65407,
|
|
187
|
-
steelblue: 4620980,
|
|
188
|
-
tan: 13808780,
|
|
189
|
-
teal: 32896,
|
|
190
|
-
thistle: 14204888,
|
|
191
|
-
tomato: 16737095,
|
|
192
|
-
turquoise: 4251856,
|
|
193
|
-
violet: 15631086,
|
|
194
|
-
wheat: 16113331,
|
|
195
|
-
white: 16777215,
|
|
196
|
-
whitesmoke: 16119285,
|
|
197
|
-
yellow: 16776960,
|
|
198
|
-
yellowgreen: 10145074
|
|
199
|
-
};
|
|
200
|
-
a(s, T, {
|
|
201
|
-
copy(e) {
|
|
202
|
-
return Object.assign(new this.constructor(), this, e);
|
|
203
|
-
},
|
|
204
|
-
displayable() {
|
|
205
|
-
return this.rgb().displayable();
|
|
206
|
-
},
|
|
207
|
-
hex: x,
|
|
208
|
-
formatHex: x,
|
|
209
|
-
formatHex8: S,
|
|
210
|
-
formatHsl: C,
|
|
211
|
-
formatRgb: w,
|
|
212
|
-
toString: w
|
|
213
|
-
});
|
|
214
|
-
function x() {
|
|
215
|
-
return this.rgb().formatHex();
|
|
216
|
-
}
|
|
217
|
-
function S() {
|
|
218
|
-
return this.rgb().formatHex8();
|
|
219
|
-
}
|
|
220
|
-
function C() {
|
|
221
|
-
return R(this).formatHsl();
|
|
222
|
-
}
|
|
223
|
-
function w() {
|
|
224
|
-
return this.rgb().formatRgb();
|
|
225
|
-
}
|
|
226
|
-
function T(e) {
|
|
227
|
-
var t, n;
|
|
228
|
-
return e = (e + "").trim().toLowerCase(), (t = p.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? E(t) : n === 3 ? new A(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? D(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? D(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = m.exec(e)) ? new A(t[1], t[2], t[3], 1) : (t = h.exec(e)) ? new A(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = g.exec(e)) ? D(t[1], t[2], t[3], t[4]) : (t = _.exec(e)) ? D(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = v.exec(e)) ? L(t[1], t[2] / 100, t[3] / 100, 1) : (t = y.exec(e)) ? L(t[1], t[2] / 100, t[3] / 100, t[4]) : b.hasOwnProperty(e) ? E(b[e]) : e === "transparent" ? new A(NaN, NaN, NaN, 0) : null;
|
|
229
|
-
}
|
|
230
|
-
function E(e) {
|
|
231
|
-
return new A(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
232
|
-
}
|
|
233
|
-
function D(e, t, n, r) {
|
|
234
|
-
return r <= 0 && (e = t = n = NaN), new A(e, t, n, r);
|
|
235
|
-
}
|
|
236
|
-
function O(e) {
|
|
237
|
-
return e instanceof s || (e = T(e)), e ? (e = e.rgb(), new A(e.r, e.g, e.b, e.opacity)) : new A();
|
|
238
|
-
}
|
|
239
|
-
function k(e, t, n, r) {
|
|
240
|
-
return arguments.length === 1 ? O(e) : new A(e, t, n, r ?? 1);
|
|
241
|
-
}
|
|
242
|
-
function A(e, t, n, r) {
|
|
243
|
-
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
244
|
-
}
|
|
245
|
-
a(A, k, o(s, {
|
|
246
|
-
brighter(e) {
|
|
247
|
-
return e = e == null ? l : l ** +e, new A(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
248
|
-
},
|
|
249
|
-
darker(e) {
|
|
250
|
-
return e = e == null ? c : c ** +e, new A(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
251
|
-
},
|
|
252
|
-
rgb() {
|
|
253
|
-
return this;
|
|
254
|
-
},
|
|
255
|
-
clamp() {
|
|
256
|
-
return new A(F(this.r), F(this.g), F(this.b), P(this.opacity));
|
|
257
|
-
},
|
|
258
|
-
displayable() {
|
|
259
|
-
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
260
|
-
},
|
|
261
|
-
hex: j,
|
|
262
|
-
formatHex: j,
|
|
263
|
-
formatHex8: M,
|
|
264
|
-
formatRgb: N,
|
|
265
|
-
toString: N
|
|
266
|
-
}));
|
|
267
|
-
function j() {
|
|
268
|
-
return `#${I(this.r)}${I(this.g)}${I(this.b)}`;
|
|
269
|
-
}
|
|
270
|
-
function M() {
|
|
271
|
-
return `#${I(this.r)}${I(this.g)}${I(this.b)}${I((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
272
|
-
}
|
|
273
|
-
function N() {
|
|
274
|
-
let e = P(this.opacity);
|
|
275
|
-
return `${e === 1 ? "rgb(" : "rgba("}${F(this.r)}, ${F(this.g)}, ${F(this.b)}${e === 1 ? ")" : `, ${e})`}`;
|
|
276
|
-
}
|
|
277
|
-
function P(e) {
|
|
278
|
-
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
279
|
-
}
|
|
280
|
-
function F(e) {
|
|
281
|
-
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
282
|
-
}
|
|
283
|
-
function I(e) {
|
|
284
|
-
return e = F(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
285
|
-
}
|
|
286
|
-
function L(e, t, n, r) {
|
|
287
|
-
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new B(e, t, n, r);
|
|
288
|
-
}
|
|
289
|
-
function R(e) {
|
|
290
|
-
if (e instanceof B) return new B(e.h, e.s, e.l, e.opacity);
|
|
291
|
-
if (e instanceof s || (e = T(e)), !e) return new B();
|
|
292
|
-
if (e instanceof B) return e;
|
|
293
|
-
e = e.rgb();
|
|
294
|
-
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, c = a - i, l = (a + i) / 2;
|
|
295
|
-
return c ? (o = t === a ? (n - r) / c + (n < r) * 6 : n === a ? (r - t) / c + 2 : (t - n) / c + 4, c /= l < .5 ? a + i : 2 - a - i, o *= 60) : c = l > 0 && l < 1 ? 0 : o, new B(o, c, l, e.opacity);
|
|
296
|
-
}
|
|
297
|
-
function z(e, t, n, r) {
|
|
298
|
-
return arguments.length === 1 ? R(e) : new B(e, t, n, r ?? 1);
|
|
299
|
-
}
|
|
300
|
-
function B(e, t, n, r) {
|
|
301
|
-
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
302
|
-
}
|
|
303
|
-
a(B, z, o(s, {
|
|
304
|
-
brighter(e) {
|
|
305
|
-
return e = e == null ? l : l ** +e, new B(this.h, this.s, this.l * e, this.opacity);
|
|
306
|
-
},
|
|
307
|
-
darker(e) {
|
|
308
|
-
return e = e == null ? c : c ** +e, new B(this.h, this.s, this.l * e, this.opacity);
|
|
309
|
-
},
|
|
310
|
-
rgb() {
|
|
311
|
-
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
|
|
312
|
-
return new A(U(e >= 240 ? e - 240 : e + 120, i, r), U(e, i, r), U(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
|
|
313
|
-
},
|
|
314
|
-
clamp() {
|
|
315
|
-
return new B(V(this.h), H(this.s), H(this.l), P(this.opacity));
|
|
316
|
-
},
|
|
317
|
-
displayable() {
|
|
318
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
319
|
-
},
|
|
320
|
-
formatHsl() {
|
|
321
|
-
let e = P(this.opacity);
|
|
322
|
-
return `${e === 1 ? "hsl(" : "hsla("}${V(this.h)}, ${H(this.s) * 100}%, ${H(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
|
|
323
|
-
}
|
|
324
|
-
}));
|
|
325
|
-
function V(e) {
|
|
326
|
-
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
|
|
327
|
-
}
|
|
328
|
-
function H(e) {
|
|
329
|
-
return Math.max(0, Math.min(1, e || 0));
|
|
330
|
-
}
|
|
331
|
-
function U(e, t, n) {
|
|
332
|
-
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
333
|
-
}
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region ../core/src/view/renderingContext/clipOptions.js
|
|
336
|
-
function W(e) {
|
|
337
|
-
if (e.clip) return e.clip;
|
|
338
|
-
if (e.clipRect) return {
|
|
339
|
-
rect: e.clipRect,
|
|
340
|
-
clipX: !0,
|
|
341
|
-
clipY: !0
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
function G(e, t) {
|
|
345
|
-
return e === t ? !0 : !e || !t ? !1 : e.clipX === t.clipX && e.clipY === t.clipY && e.rect.equals(t.rect);
|
|
346
|
-
}
|
|
347
|
-
function K(e, t, n) {
|
|
348
|
-
return t || n ? {
|
|
349
|
-
rect: e,
|
|
350
|
-
clipX: t,
|
|
351
|
-
clipY: n
|
|
352
|
-
} : void 0;
|
|
353
|
-
}
|
|
354
|
-
function q(e, t) {
|
|
355
|
-
return t ? t.clipX && t.clipY ? e.intersect(t.rect) : t.clipX ? e.intersectX(t.rect) : t.clipY ? e.intersectY(t.rect) : e : e;
|
|
356
|
-
}
|
|
357
|
-
function J(e, t) {
|
|
358
|
-
if (!e) return t;
|
|
359
|
-
if (!t) return e;
|
|
360
|
-
let n = e.clipX || t.clipX, r = e.clipY || t.clipY, i = e.clipX && t.clipX ? e.rect.intersectX(t.rect) : t.clipX ? t.rect : e.rect, a = e.clipY && t.clipY ? e.rect.intersectY(t.rect) : t.clipY ? t.rect : e.rect;
|
|
361
|
-
return K(e.rect.modify({
|
|
362
|
-
x: () => i.x,
|
|
363
|
-
y: () => a.y,
|
|
364
|
-
width: () => i.width,
|
|
365
|
-
height: () => a.height
|
|
366
|
-
}), n, r);
|
|
367
|
-
}
|
|
368
|
-
function Y(e, t) {
|
|
369
|
-
if (e === !0) return K(t, !0, !0);
|
|
370
|
-
if (e === "x") return K(t, !0, !1);
|
|
371
|
-
if (e === "y") return K(t, !1, !0);
|
|
372
|
-
}
|
|
373
|
-
function X(e, t, n) {
|
|
374
|
-
if (t !== "never") return J(e, Y(t, n));
|
|
375
|
-
}
|
|
376
|
-
//#endregion
|
|
377
|
-
export { e as _, W as a, A as c, c as d, z as f, o as g, a as h, K as i, l, O as m, G as n, X as o, k as p, J as r, s, q as t, T as u };
|