joplin-plugin-copy-as-html 1.1.13 → 1.1.15

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 CHANGED
@@ -17,7 +17,7 @@ This will populate the clipboard's text/html category with the HTML formatted te
17
17
 
18
18
  By default, the plugin will embed any images as base64 in the text/html output, allowing you paste text + images into external applications. However, this can be disabled in the plugin's settings.
19
19
 
20
- This should work with both markdown image embeds and the html `<img>` embeds that you get when resizing images via joplin's rich text editor.
20
+ This will work with both markdown image embeds and the html `<img>` embeds that you get when resizing images via joplin's rich text editor.
21
21
 
22
22
  ### Export as fragment or full HTML document
23
23
 
@@ -70,6 +70,12 @@ The plugin will adhere to Joplin's settings for whether or not to render:
70
70
  > [!note]
71
71
  > Mermaid/Math are not supported, they will render as plain text (code).
72
72
 
73
+ #### Github Alerts
74
+
75
+ Github Alert syntax, (e.g. `>[!NOTE]`) is supported via the markdown-it-github-alerts plugin. In order for github alerts to be rendered nicely, you must be using the Full document mode with CSS styling targeting the .markdown-alert classes. The default [stylesheet](https://github.com/bwat47/joplin-copy-as-html/blob/main/src/defaultStylesheet.ts) contains styling for github alerts, example:
76
+
77
+ <img width="647" height="702" alt="image" src="https://github.com/user-attachments/assets/eb00e25d-5db4-4386-8d84-ec8ffb7f2540" />
78
+
73
79
  ## Copy as Plain Text
74
80
 
75
81
  "Copy selection as Plain Text" is provided as a right click context menu option and as a keyboard shortcut (ctrl + alt + c by default).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joplin-plugin-copy-as-html",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "scripts": {
5
5
  "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
6
6
  "prepare": "npm run dist",
@@ -19,21 +19,27 @@
19
19
  "publish"
20
20
  ],
21
21
  "devDependencies": {
22
+ "@babel/core": "^7.28.4",
23
+ "@babel/preset-env": "^7.28.3",
22
24
  "@eslint/eslintrc": "^3.3.1",
23
25
  "@eslint/js": "^9.34.0",
26
+ "@types/dompurify": "^3.0.5",
24
27
  "@types/jest": "^30.0.0",
28
+ "@types/jsdom": "^21.1.7",
25
29
  "@types/markdown-it": "^14.1.2",
26
30
  "@types/node": "^18.7.13",
27
- "@typescript-eslint/eslint-plugin": "^8.40.0",
28
- "@typescript-eslint/parser": "^8.40.0",
31
+ "@typescript-eslint/eslint-plugin": "^8.42.0",
32
+ "@typescript-eslint/parser": "^8.42.0",
33
+ "babel-jest": "^30.1.2",
29
34
  "chalk": "^4.1.0",
30
35
  "copy-webpack-plugin": "^11.0.0",
31
- "eslint": "^9.34.0",
36
+ "eslint": "^9.35.0",
32
37
  "eslint-config-prettier": "^10.1.8",
33
38
  "eslint-plugin-prettier": "^5.5.4",
34
- "fs-extra": "^10.1.0",
39
+ "fs-extra": "^11.3.1",
35
40
  "glob": "^8.0.3",
36
- "jest": "^30.0.5",
41
+ "jest": "^30.1.3",
42
+ "jsdom": "^26.1.0",
37
43
  "prettier": "^3.6.2",
38
44
  "tar": "^6.1.11",
39
45
  "ts-jest": "^29.4.1",
@@ -43,19 +49,21 @@
43
49
  "webpack-cli": "^4.10.0"
44
50
  },
45
51
  "dependencies": {
52
+ "dompurify": "^3.2.6",
46
53
  "markdown-it": "^14.1.0",
47
54
  "markdown-it-abbr": "^2.0.0",
55
+ "markdown-it-anchor": "^9.2.0",
48
56
  "markdown-it-deflist": "^3.0.0",
49
57
  "markdown-it-emoji": "^3.0.0",
50
58
  "markdown-it-footnote": "^4.0.0",
59
+ "markdown-it-github-alerts": "^1.0.0",
51
60
  "markdown-it-ins": "^4.0.0",
52
61
  "markdown-it-mark": "^4.0.0",
53
- "markdown-it-github-alerts": "^0.2.0",
54
62
  "markdown-it-multimd-table": "^4.2.3",
55
63
  "markdown-it-sub": "^2.0.0",
56
64
  "markdown-it-sup": "^2.0.0",
57
65
  "markdown-it-task-lists": "^2.1.1",
58
66
  "markdown-it-toc-done-right": "^4.2.0",
59
- "string-width": "^7.2.0"
67
+ "string-width": "^8.1.0"
60
68
  }
61
69
  }
Binary file
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 1,
3
3
  "id": "com.bwat47.copyashtml",
4
4
  "app_min_version": "3.3",
5
- "version": "1.1.13",
5
+ "version": "1.1.15",
6
6
  "name": "Copy as HTML",
7
7
  "description": "Allows you to copy text with HTML (rich text) formatting from the markdown editor (including images). Also allows you to copy as plain text (without markdown formatting)",
8
8
  "author": "bwat47",
@@ -142,6 +142,6 @@
142
142
  "value": "spaces"
143
143
  }
144
144
  },
145
- "_publish_hash": "sha256:bbf57a3167d40ffd13360a069bbe01b0e9b0d31982289d22ec2024c9f66063a6",
146
- "_publish_commit": "main:24134ba742405617f46855f9a7aa00bd437875df"
145
+ "_publish_hash": "sha256:82d63f0691b1208a49121fe60139d22d12fdae1a64b9f72ff06ac57bb4c0f9de",
146
+ "_publish_commit": "main:ffb83e027e2fe7777bfefb74c6405da31d15660b"
147
147
  }
@@ -0,0 +1,334 @@
1
+ /*!
2
+ * decimal.js v10.6.0
3
+ * An arbitrary-precision Decimal type for JavaScript.
4
+ * https://github.com/MikeMcl/decimal.js
5
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
6
+ * MIT Licence
7
+ */
8
+
9
+ /*!
10
+ * Copyright (c) 2015-2020, Salesforce.com, Inc.
11
+ * All rights reserved.
12
+ *
13
+ * Redistribution and use in source and binary forms, with or without
14
+ * modification, are permitted provided that the following conditions are met:
15
+ *
16
+ * 1. Redistributions of source code must retain the above copyright notice,
17
+ * this list of conditions and the following disclaimer.
18
+ *
19
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
20
+ * this list of conditions and the following disclaimer in the documentation
21
+ * and/or other materials provided with the distribution.
22
+ *
23
+ * 3. Neither the name of Salesforce.com nor the names of its contributors may
24
+ * be used to endorse or promote products derived from this software without
25
+ * specific prior written permission.
26
+ *
27
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
31
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
+ * POSSIBILITY OF SUCH DAMAGE.
38
+ */
39
+
40
+ /*! For license information please see index.js.LICENSE.txt */
41
+
42
+ /**
43
+ * @description Calculate deltaE OK which is the simple root sum of squares
44
+ * @param {number[]} reference - Array of OKLab values: L as 0..1, a and b as -1..1
45
+ * @param {number[]} sample - Array of OKLab values: L as 0..1, a and b as -1..1
46
+ * @return {number} How different a color sample is from reference
47
+ *
48
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
49
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
50
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/deltaEOK.js
51
+ */
52
+
53
+ /**
54
+ * @license MIT https://github.com/facelessuser/coloraide/blob/main/LICENSE.md
55
+ */
56
+
57
+ /**
58
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
59
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
60
+ *
61
+ * XYZ <-> LMS matrices recalculated for consistent reference white
62
+ * @see https://github.com/w3c/csswg-drafts/issues/6642#issuecomment-943521484
63
+ */
64
+
65
+ /**
66
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
67
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
68
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
69
+ */
70
+
71
+ /**
72
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
73
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
74
+ */
75
+
76
+ /**
77
+ * @param {number} hue - Hue as degrees 0..360
78
+ * @param {number} white - Whiteness as percentage 0..100
79
+ * @param {number} black - Blackness as percentage 0..100
80
+ * @return {number[]} Array of RGB components 0..1
81
+ *
82
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
83
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
84
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hwbToRgb.js
85
+ */
86
+
87
+ /**
88
+ * @param {number} hue - Hue as degrees 0..360
89
+ * @param {number} sat - Saturation as percentage 0..100
90
+ * @param {number} light - Lightness as percentage 0..100
91
+ * @return {number[]} Array of sRGB components; in-gamut colors in range [0..1]
92
+ *
93
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
94
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
95
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/hslToRgb.js
96
+ */
97
+
98
+ /**
99
+ * Assuming XYZ is relative to D50, convert to CIE Lab
100
+ * from CIE standard, which now defines these as a rational fraction
101
+ *
102
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
103
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
104
+ */
105
+
106
+ /**
107
+ * Bradford chromatic adaptation from D50 to D65
108
+ *
109
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
110
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
111
+ */
112
+
113
+ /**
114
+ * Bradford chromatic adaptation from D65 to D50
115
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
116
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
117
+ * @see http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
118
+ */
119
+
120
+ /**
121
+ * Character class utilities for XML NS 1.0 edition 3.
122
+ *
123
+ * @author Louis-Dominique Dubeau
124
+ * @license MIT
125
+ * @copyright Louis-Dominique Dubeau
126
+ */
127
+
128
+ /**
129
+ * Character classes and associated utilities for the 2nd edition of XML 1.1.
130
+ *
131
+ * @author Louis-Dominique Dubeau
132
+ * @license MIT
133
+ * @copyright Louis-Dominique Dubeau
134
+ */
135
+
136
+ /**
137
+ * Character classes and associated utilities for the 5th edition of XML 1.0.
138
+ *
139
+ * @author Louis-Dominique Dubeau
140
+ * @license MIT
141
+ * @copyright Louis-Dominique Dubeau
142
+ */
143
+
144
+ /**
145
+ * Convert D50 XYZ to linear-light prophoto-rgb
146
+ *
147
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
148
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
149
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
150
+ */
151
+
152
+ /**
153
+ * Convert Lab to D50-adapted XYZ
154
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
155
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
156
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
157
+ */
158
+
159
+ /**
160
+ * Convert XYZ to linear-light P3
161
+ *
162
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
163
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
164
+ */
165
+
166
+ /**
167
+ * Convert XYZ to linear-light rec2020
168
+ *
169
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
170
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
171
+ */
172
+
173
+ /**
174
+ * Convert an array of a98-rgb values in the range 0.0 - 1.0
175
+ * to linear light (un-companded) form. Negative values are also now accepted
176
+ *
177
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
178
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
179
+ */
180
+
181
+ /**
182
+ * Convert an array of display-p3 RGB values in the range 0.0 - 1.0
183
+ * to linear light (un-companded) form.
184
+ *
185
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
186
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
187
+ */
188
+
189
+ /**
190
+ * Convert an array of gamma-corrected sRGB values in the 0.0 to 1.0 range to HSL.
191
+ *
192
+ * @param {Color} RGB [r, g, b]
193
+ * - Red component 0..1
194
+ * - Green component 0..1
195
+ * - Blue component 0..1
196
+ * @return {number[]} Array of HSL values: Hue as degrees 0..360, Saturation and Lightness as percentages 0..100
197
+ *
198
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
199
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/utilities.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
200
+ *
201
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/better-rgbToHsl.js
202
+ */
203
+
204
+ /**
205
+ * Convert an array of linear-light a98-rgb in the range 0.0-1.0
206
+ * to gamma corrected form. Negative values are also now accepted
207
+ *
208
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
209
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
210
+ */
211
+
212
+ /**
213
+ * Convert an array of linear-light a98-rgb values to CIE XYZ
214
+ * http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
215
+ * has greater numerical precision than section 4.3.5.3 of
216
+ * https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
217
+ * but the values below were calculated from first principles
218
+ * from the chromaticity coordinates of R G B W
219
+ *
220
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
221
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
222
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
223
+ * @see https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf
224
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/matrixmaker.html
225
+ */
226
+
227
+ /**
228
+ * Convert an array of linear-light display-p3 RGB in the range 0.0-1.0
229
+ * to gamma corrected form
230
+ *
231
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
232
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
233
+ */
234
+
235
+ /**
236
+ * Convert an array of linear-light display-p3 values to CIE XYZ
237
+ * using D65 (no chromatic adaptation)
238
+ *
239
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
240
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
241
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
242
+ */
243
+
244
+ /**
245
+ * Convert an array of linear-light prophoto-rgb in the range 0.0-1.0
246
+ * to gamma corrected form.
247
+ * Transfer curve is gamma 1.8 with a small linear portion.
248
+ *
249
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
250
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
251
+ */
252
+
253
+ /**
254
+ * Convert an array of linear-light prophoto-rgb values to CIE D50 XYZ.
255
+ * Matrix cannot be expressed in rational form, but is calculated to 64 bit accuracy.
256
+ *
257
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
258
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
259
+ * @see see https://github.com/w3c/csswg-drafts/issues/7675
260
+ */
261
+
262
+ /**
263
+ * Convert an array of linear-light rec2020 RGB in the range 0.0-1.0
264
+ * to gamma corrected form ITU-R BT.2020-2 p.4
265
+ *
266
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
267
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
268
+ */
269
+
270
+ /**
271
+ * Convert an array of linear-light rec2020 values to CIE XYZ
272
+ * using D65 (no chromatic adaptation)
273
+ *
274
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
275
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
276
+ * @see http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
277
+ */
278
+
279
+ /**
280
+ * Convert an array of linear-light sRGB values in the range 0.0-1.0 to gamma corrected form
281
+ * Extended transfer function:
282
+ * For negative values, linear portion extends on reflection
283
+ * of axis, then uses reflected pow below that
284
+ *
285
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
286
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
287
+ * @see https://en.wikipedia.org/wiki/SRGB
288
+ */
289
+
290
+ /**
291
+ * Convert an array of linear-light sRGB values to CIE XYZ
292
+ * using sRGB's own white, D65 (no chromatic adaptation)
293
+ *
294
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
295
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
296
+ */
297
+
298
+ /**
299
+ * Convert an array of of sRGB values where in-gamut values are in the range
300
+ * [0 - 1] to linear light (un-companded) form.
301
+ * Extended transfer function:
302
+ * For negative values, linear portion is extended on reflection of axis,
303
+ * then reflected power function is used.
304
+ *
305
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
306
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
307
+ * @see https://en.wikipedia.org/wiki/SRGB
308
+ */
309
+
310
+ /**
311
+ * Convert an array of prophoto-rgb values where in-gamut Colors are in the
312
+ * range [0.0 - 1.0] to linear light (un-companded) form. Transfer curve is
313
+ * gamma 1.8 with a small linear portion. Extended transfer function
314
+ *
315
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
316
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
317
+ */
318
+
319
+ /**
320
+ * Convert an array of rec2020 RGB values in the range 0.0 - 1.0
321
+ * to linear light (un-companded) form.
322
+ * ITU-R BT.2020-2 p.4
323
+ *
324
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
325
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
326
+ */
327
+
328
+ /**
329
+ * Given OKLab, convert to XYZ relative to D65
330
+ *
331
+ * @license W3C https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
332
+ * @copyright This software or document includes material copied from or derived from https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js. Copyright © 2022 W3C® (MIT, ERCIM, Keio, Beihang).
333
+ * @see https://github.com/w3c/csswg-drafts/blob/main/css-color-4/conversions.js
334
+ */