koishi-plugin-cchess 2.3.0 → 2.4.1
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/CHANGELOG.md +5 -0
- package/DESIGN_SYSTEM.md +61 -0
- package/README.md +16 -14
- package/THIRD_PARTY_NOTICES.md +195 -0
- package/lib/index.js +5238 -188
- package/lib/m3.d.ts +25 -21
- package/lib/material-color-browser.d.ts +1 -0
- package/lib/material-color.d.ts +549 -0
- package/lib/ux.d.ts +31 -0
- package/package.json +8 -4
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
declare var Hct: {
|
|
18
|
+
new (argb: any): {
|
|
19
|
+
toInt(): any;
|
|
20
|
+
/**
|
|
21
|
+
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
22
|
+
* Ranges from 0 <= hue < 360.
|
|
23
|
+
*/
|
|
24
|
+
hue: any;
|
|
25
|
+
chroma: any;
|
|
26
|
+
/** Lightness. Ranges from 0 to 100. */
|
|
27
|
+
tone: any;
|
|
28
|
+
/** Sets a property of the Hct object. */
|
|
29
|
+
setValue(propertyName: any, value: any): void;
|
|
30
|
+
toString(): string;
|
|
31
|
+
setInternalState(argb: any): void;
|
|
32
|
+
/**
|
|
33
|
+
* Translates a color into different [ViewingConditions].
|
|
34
|
+
*
|
|
35
|
+
* Colors change appearance. They look different with lights on versus off,
|
|
36
|
+
* the same color, as in hex code, on white looks different when on black.
|
|
37
|
+
* This is called color relativity, most famously explicated by Josef Albers
|
|
38
|
+
* in Interaction of Color.
|
|
39
|
+
*
|
|
40
|
+
* In color science, color appearance models can account for this and
|
|
41
|
+
* calculate the appearance of a color in different settings. HCT is based on
|
|
42
|
+
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
43
|
+
*
|
|
44
|
+
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
45
|
+
*/
|
|
46
|
+
inViewingConditions(vc: any): /*elided*/ any;
|
|
47
|
+
};
|
|
48
|
+
from(hue: any, chroma: any, tone: any): {
|
|
49
|
+
toInt(): any;
|
|
50
|
+
/**
|
|
51
|
+
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
52
|
+
* Ranges from 0 <= hue < 360.
|
|
53
|
+
*/
|
|
54
|
+
hue: any;
|
|
55
|
+
chroma: any;
|
|
56
|
+
/** Lightness. Ranges from 0 to 100. */
|
|
57
|
+
tone: any;
|
|
58
|
+
/** Sets a property of the Hct object. */
|
|
59
|
+
setValue(propertyName: any, value: any): void;
|
|
60
|
+
toString(): string;
|
|
61
|
+
setInternalState(argb: any): void;
|
|
62
|
+
/**
|
|
63
|
+
* Translates a color into different [ViewingConditions].
|
|
64
|
+
*
|
|
65
|
+
* Colors change appearance. They look different with lights on versus off,
|
|
66
|
+
* the same color, as in hex code, on white looks different when on black.
|
|
67
|
+
* This is called color relativity, most famously explicated by Josef Albers
|
|
68
|
+
* in Interaction of Color.
|
|
69
|
+
*
|
|
70
|
+
* In color science, color appearance models can account for this and
|
|
71
|
+
* calculate the appearance of a color in different settings. HCT is based on
|
|
72
|
+
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
73
|
+
*
|
|
74
|
+
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
75
|
+
*/
|
|
76
|
+
inViewingConditions(vc: any): /*elided*/ any;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @param argb ARGB representation of a color.
|
|
80
|
+
* @return HCT representation of a color in default viewing conditions
|
|
81
|
+
*/
|
|
82
|
+
fromInt(argb: any): {
|
|
83
|
+
toInt(): any;
|
|
84
|
+
/**
|
|
85
|
+
* A number, in degrees, representing ex. red, orange, yellow, etc.
|
|
86
|
+
* Ranges from 0 <= hue < 360.
|
|
87
|
+
*/
|
|
88
|
+
hue: any;
|
|
89
|
+
chroma: any;
|
|
90
|
+
/** Lightness. Ranges from 0 to 100. */
|
|
91
|
+
tone: any;
|
|
92
|
+
/** Sets a property of the Hct object. */
|
|
93
|
+
setValue(propertyName: any, value: any): void;
|
|
94
|
+
toString(): string;
|
|
95
|
+
setInternalState(argb: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* Translates a color into different [ViewingConditions].
|
|
98
|
+
*
|
|
99
|
+
* Colors change appearance. They look different with lights on versus off,
|
|
100
|
+
* the same color, as in hex code, on white looks different when on black.
|
|
101
|
+
* This is called color relativity, most famously explicated by Josef Albers
|
|
102
|
+
* in Interaction of Color.
|
|
103
|
+
*
|
|
104
|
+
* In color science, color appearance models can account for this and
|
|
105
|
+
* calculate the appearance of a color in different settings. HCT is based on
|
|
106
|
+
* CAM16, a color appearance model, and uses it to make these calculations.
|
|
107
|
+
*
|
|
108
|
+
* See [ViewingConditions.make] for parameters affecting color appearance.
|
|
109
|
+
*/
|
|
110
|
+
inViewingConditions(vc: any): /*elided*/ any;
|
|
111
|
+
};
|
|
112
|
+
isBlue(hue: any): boolean;
|
|
113
|
+
isYellow(hue: any): boolean;
|
|
114
|
+
isCyan(hue: any): boolean;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* @license
|
|
118
|
+
* Copyright 2021 Google LLC
|
|
119
|
+
*
|
|
120
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
121
|
+
* you may not use this file except in compliance with the License.
|
|
122
|
+
* You may obtain a copy of the License at
|
|
123
|
+
*
|
|
124
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
125
|
+
*
|
|
126
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
127
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
128
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
129
|
+
* See the License for the specific language governing permissions and
|
|
130
|
+
* limitations under the License.
|
|
131
|
+
*/
|
|
132
|
+
/**
|
|
133
|
+
* @license
|
|
134
|
+
* Copyright 2021 Google LLC
|
|
135
|
+
*
|
|
136
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
137
|
+
* you may not use this file except in compliance with the License.
|
|
138
|
+
* You may obtain a copy of the License at
|
|
139
|
+
*
|
|
140
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
141
|
+
*
|
|
142
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
143
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
144
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
145
|
+
* See the License for the specific language governing permissions and
|
|
146
|
+
* limitations under the License.
|
|
147
|
+
*/
|
|
148
|
+
/**
|
|
149
|
+
* @license
|
|
150
|
+
* Copyright 2021 Google LLC
|
|
151
|
+
*
|
|
152
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
153
|
+
* you may not use this file except in compliance with the License.
|
|
154
|
+
* You may obtain a copy of the License at
|
|
155
|
+
*
|
|
156
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
157
|
+
*
|
|
158
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
159
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
160
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
161
|
+
* See the License for the specific language governing permissions and
|
|
162
|
+
* limitations under the License.
|
|
163
|
+
*/
|
|
164
|
+
/**
|
|
165
|
+
* @license
|
|
166
|
+
* Copyright 2021 Google LLC
|
|
167
|
+
*
|
|
168
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
169
|
+
* you may not use this file except in compliance with the License.
|
|
170
|
+
* You may obtain a copy of the License at
|
|
171
|
+
*
|
|
172
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
173
|
+
*
|
|
174
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
175
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
176
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
177
|
+
* See the License for the specific language governing permissions and
|
|
178
|
+
* limitations under the License.
|
|
179
|
+
*/
|
|
180
|
+
/**
|
|
181
|
+
* @license
|
|
182
|
+
* Copyright 2021 Google LLC
|
|
183
|
+
*
|
|
184
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
185
|
+
* you may not use this file except in compliance with the License.
|
|
186
|
+
* You may obtain a copy of the License at
|
|
187
|
+
*
|
|
188
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
189
|
+
*
|
|
190
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
191
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
192
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
193
|
+
* See the License for the specific language governing permissions and
|
|
194
|
+
* limitations under the License.
|
|
195
|
+
*/
|
|
196
|
+
/**
|
|
197
|
+
* @license
|
|
198
|
+
* Copyright 2021 Google LLC
|
|
199
|
+
*
|
|
200
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
+
* you may not use this file except in compliance with the License.
|
|
202
|
+
* You may obtain a copy of the License at
|
|
203
|
+
*
|
|
204
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
+
*
|
|
206
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
207
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
+
* See the License for the specific language governing permissions and
|
|
210
|
+
* limitations under the License.
|
|
211
|
+
*/
|
|
212
|
+
/**
|
|
213
|
+
* @license
|
|
214
|
+
* Copyright 2021 Google LLC
|
|
215
|
+
*
|
|
216
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
217
|
+
* you may not use this file except in compliance with the License.
|
|
218
|
+
* You may obtain a copy of the License at
|
|
219
|
+
*
|
|
220
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
221
|
+
*
|
|
222
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
223
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
224
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
225
|
+
* See the License for the specific language governing permissions and
|
|
226
|
+
* limitations under the License.
|
|
227
|
+
*/
|
|
228
|
+
/**
|
|
229
|
+
* @license
|
|
230
|
+
* Copyright 2021 Google LLC
|
|
231
|
+
*
|
|
232
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
233
|
+
* you may not use this file except in compliance with the License.
|
|
234
|
+
* You may obtain a copy of the License at
|
|
235
|
+
*
|
|
236
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
237
|
+
*
|
|
238
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
239
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
240
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
241
|
+
* See the License for the specific language governing permissions and
|
|
242
|
+
* limitations under the License.
|
|
243
|
+
*/
|
|
244
|
+
/**
|
|
245
|
+
* @license
|
|
246
|
+
* Copyright 2023 Google LLC
|
|
247
|
+
*
|
|
248
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
249
|
+
* you may not use this file except in compliance with the License.
|
|
250
|
+
* You may obtain a copy of the License at
|
|
251
|
+
*
|
|
252
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
253
|
+
*
|
|
254
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
255
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
256
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
257
|
+
* See the License for the specific language governing permissions and
|
|
258
|
+
* limitations under the License.
|
|
259
|
+
*/
|
|
260
|
+
/**
|
|
261
|
+
* @license
|
|
262
|
+
* Copyright 2022 Google LLC
|
|
263
|
+
*
|
|
264
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
265
|
+
* you may not use this file except in compliance with the License.
|
|
266
|
+
* You may obtain a copy of the License at
|
|
267
|
+
*
|
|
268
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
269
|
+
*
|
|
270
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
271
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
272
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
273
|
+
* See the License for the specific language governing permissions and
|
|
274
|
+
* limitations under the License.
|
|
275
|
+
*/
|
|
276
|
+
/**
|
|
277
|
+
* @license
|
|
278
|
+
* Copyright 2023 Google LLC
|
|
279
|
+
*
|
|
280
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
281
|
+
* you may not use this file except in compliance with the License.
|
|
282
|
+
* You may obtain a copy of the License at
|
|
283
|
+
*
|
|
284
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
285
|
+
*
|
|
286
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
287
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
288
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
289
|
+
* See the License for the specific language governing permissions and
|
|
290
|
+
* limitations under the License.
|
|
291
|
+
*/
|
|
292
|
+
/**
|
|
293
|
+
* @license
|
|
294
|
+
* Copyright 2022 Google LLC
|
|
295
|
+
*
|
|
296
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
297
|
+
* you may not use this file except in compliance with the License.
|
|
298
|
+
* You may obtain a copy of the License at
|
|
299
|
+
*
|
|
300
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
301
|
+
*
|
|
302
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
303
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
304
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
305
|
+
* See the License for the specific language governing permissions and
|
|
306
|
+
* limitations under the License.
|
|
307
|
+
*/
|
|
308
|
+
/**
|
|
309
|
+
* @license
|
|
310
|
+
* Copyright 2022 Google LLC
|
|
311
|
+
*
|
|
312
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
313
|
+
* you may not use this file except in compliance with the License.
|
|
314
|
+
* You may obtain a copy of the License at
|
|
315
|
+
*
|
|
316
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
317
|
+
*
|
|
318
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
319
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
320
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
321
|
+
* See the License for the specific language governing permissions and
|
|
322
|
+
* limitations under the License.
|
|
323
|
+
*/
|
|
324
|
+
/**
|
|
325
|
+
* @license
|
|
326
|
+
* Copyright 2022 Google LLC
|
|
327
|
+
*
|
|
328
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
329
|
+
* you may not use this file except in compliance with the License.
|
|
330
|
+
* You may obtain a copy of the License at
|
|
331
|
+
*
|
|
332
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
333
|
+
*
|
|
334
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
335
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
336
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
337
|
+
* See the License for the specific language governing permissions and
|
|
338
|
+
* limitations under the License.
|
|
339
|
+
*/
|
|
340
|
+
/**
|
|
341
|
+
* @license
|
|
342
|
+
* Copyright 2022 Google LLC
|
|
343
|
+
*
|
|
344
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
345
|
+
* you may not use this file except in compliance with the License.
|
|
346
|
+
* You may obtain a copy of the License at
|
|
347
|
+
*
|
|
348
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
349
|
+
*
|
|
350
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
351
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
352
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
353
|
+
* See the License for the specific language governing permissions and
|
|
354
|
+
* limitations under the License.
|
|
355
|
+
*/
|
|
356
|
+
/**
|
|
357
|
+
* @license
|
|
358
|
+
* Copyright 2022 Google LLC
|
|
359
|
+
*
|
|
360
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
361
|
+
* you may not use this file except in compliance with the License.
|
|
362
|
+
* You may obtain a copy of the License at
|
|
363
|
+
*
|
|
364
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
365
|
+
*
|
|
366
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
367
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
368
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
369
|
+
* See the License for the specific language governing permissions and
|
|
370
|
+
* limitations under the License.
|
|
371
|
+
*/
|
|
372
|
+
declare var SchemeTonalSpot: {
|
|
373
|
+
new (sourceColorHct: any, isDark: any, contrastLevel: any, specVersion?: any, platform?: any): {
|
|
374
|
+
toString(): string;
|
|
375
|
+
getArgb(dynamicColor: any): any;
|
|
376
|
+
getHct(dynamicColor: any): any;
|
|
377
|
+
get primaryPaletteKeyColor(): any;
|
|
378
|
+
get secondaryPaletteKeyColor(): any;
|
|
379
|
+
get tertiaryPaletteKeyColor(): any;
|
|
380
|
+
get neutralPaletteKeyColor(): any;
|
|
381
|
+
get neutralVariantPaletteKeyColor(): any;
|
|
382
|
+
get errorPaletteKeyColor(): any;
|
|
383
|
+
get background(): any;
|
|
384
|
+
get onBackground(): any;
|
|
385
|
+
get surface(): any;
|
|
386
|
+
get surfaceDim(): any;
|
|
387
|
+
get surfaceBright(): any;
|
|
388
|
+
get surfaceContainerLowest(): any;
|
|
389
|
+
get surfaceContainerLow(): any;
|
|
390
|
+
get surfaceContainer(): any;
|
|
391
|
+
get surfaceContainerHigh(): any;
|
|
392
|
+
get surfaceContainerHighest(): any;
|
|
393
|
+
get onSurface(): any;
|
|
394
|
+
get surfaceVariant(): any;
|
|
395
|
+
get onSurfaceVariant(): any;
|
|
396
|
+
get inverseSurface(): any;
|
|
397
|
+
get inverseOnSurface(): any;
|
|
398
|
+
get outline(): any;
|
|
399
|
+
get outlineVariant(): any;
|
|
400
|
+
get shadow(): any;
|
|
401
|
+
get scrim(): any;
|
|
402
|
+
get surfaceTint(): any;
|
|
403
|
+
get primary(): any;
|
|
404
|
+
get primaryDim(): any;
|
|
405
|
+
get onPrimary(): any;
|
|
406
|
+
get primaryContainer(): any;
|
|
407
|
+
get onPrimaryContainer(): any;
|
|
408
|
+
get primaryFixed(): any;
|
|
409
|
+
get primaryFixedDim(): any;
|
|
410
|
+
get onPrimaryFixed(): any;
|
|
411
|
+
get onPrimaryFixedVariant(): any;
|
|
412
|
+
get inversePrimary(): any;
|
|
413
|
+
get secondary(): any;
|
|
414
|
+
get secondaryDim(): any;
|
|
415
|
+
get onSecondary(): any;
|
|
416
|
+
get secondaryContainer(): any;
|
|
417
|
+
get onSecondaryContainer(): any;
|
|
418
|
+
get secondaryFixed(): any;
|
|
419
|
+
get secondaryFixedDim(): any;
|
|
420
|
+
get onSecondaryFixed(): any;
|
|
421
|
+
get onSecondaryFixedVariant(): any;
|
|
422
|
+
get tertiary(): any;
|
|
423
|
+
get tertiaryDim(): any;
|
|
424
|
+
get onTertiary(): any;
|
|
425
|
+
get tertiaryContainer(): any;
|
|
426
|
+
get onTertiaryContainer(): any;
|
|
427
|
+
get tertiaryFixed(): any;
|
|
428
|
+
get tertiaryFixedDim(): any;
|
|
429
|
+
get onTertiaryFixed(): any;
|
|
430
|
+
get onTertiaryFixedVariant(): any;
|
|
431
|
+
get error(): any;
|
|
432
|
+
get errorDim(): any;
|
|
433
|
+
get onError(): any;
|
|
434
|
+
get errorContainer(): any;
|
|
435
|
+
get onErrorContainer(): any;
|
|
436
|
+
};
|
|
437
|
+
maybeFallbackSpecVersion(specVersion: any, variant: any): any;
|
|
438
|
+
/**
|
|
439
|
+
* Returns a new hue based on a piecewise function and input color hue.
|
|
440
|
+
*
|
|
441
|
+
* For example, for the following function:
|
|
442
|
+
* result = 26 if 0 <= hue < 101
|
|
443
|
+
* result = 39 if 101 <= hue < 210
|
|
444
|
+
* result = 28 if 210 <= hue < 360
|
|
445
|
+
*
|
|
446
|
+
* call the function as:
|
|
447
|
+
*
|
|
448
|
+
* const hueBreakpoints = [0, 101, 210, 360];
|
|
449
|
+
* const hues = [26, 39, 28];
|
|
450
|
+
* const result = scheme.piecewise(hue, hueBreakpoints, hues);
|
|
451
|
+
*
|
|
452
|
+
* @param sourceColorHct The input value.
|
|
453
|
+
* @param hueBreakpoints The breakpoints, in sorted order. No default lower or
|
|
454
|
+
* upper bounds are assumed.
|
|
455
|
+
* @param hues The hues that should be applied when source color's hue is >=
|
|
456
|
+
* the same index in hueBrakpoints array, and < the hue at the next index
|
|
457
|
+
* in hueBrakpoints array. Otherwise, the source color's hue is returned.
|
|
458
|
+
*/
|
|
459
|
+
getPiecewiseHue(sourceColorHct: any, hueBreakpoints: any, hues: any): any;
|
|
460
|
+
/**
|
|
461
|
+
* Returns a shifted hue based on a piecewise function and input color hue.
|
|
462
|
+
*
|
|
463
|
+
* For example, for the following function:
|
|
464
|
+
* result = hue + 26 if 0 <= hue < 101
|
|
465
|
+
* result = hue - 39 if 101 <= hue < 210
|
|
466
|
+
* result = hue + 28 if 210 <= hue < 360
|
|
467
|
+
*
|
|
468
|
+
* call the function as:
|
|
469
|
+
*
|
|
470
|
+
* const hueBreakpoints = [0, 101, 210, 360];
|
|
471
|
+
* const hues = [26, -39, 28];
|
|
472
|
+
* const result = scheme.getRotatedHue(hue, hueBreakpoints, hues);
|
|
473
|
+
*
|
|
474
|
+
* @param sourceColorHct the source color of the theme, in HCT.
|
|
475
|
+
* @param hueBreakpoints The "breakpoints", i.e. the hues at which a rotation
|
|
476
|
+
* should be apply. No default lower or upper bounds are assumed.
|
|
477
|
+
* @param rotations The rotation that should be applied when source color's
|
|
478
|
+
* hue is >= the same index in hues array, and < the hue at the next
|
|
479
|
+
* index in hues array. Otherwise, the source color's hue is returned.
|
|
480
|
+
*/
|
|
481
|
+
getRotatedHue(sourceColorHct: any, hueBreakpoints: any, rotations: any): any;
|
|
482
|
+
};
|
|
483
|
+
/**
|
|
484
|
+
* @license
|
|
485
|
+
* Copyright 2021 Google LLC
|
|
486
|
+
*
|
|
487
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
488
|
+
* you may not use this file except in compliance with the License.
|
|
489
|
+
* You may obtain a copy of the License at
|
|
490
|
+
*
|
|
491
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
492
|
+
*
|
|
493
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
494
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
495
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
496
|
+
* See the License for the specific language governing permissions and
|
|
497
|
+
* limitations under the License.
|
|
498
|
+
*/
|
|
499
|
+
declare function hexFromArgb(argb: any): string;
|
|
500
|
+
declare function argbFromHex(hex: any): number;
|
|
501
|
+
/**
|
|
502
|
+
* @license
|
|
503
|
+
* Copyright 2021 Google LLC
|
|
504
|
+
*
|
|
505
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
506
|
+
* you may not use this file except in compliance with the License.
|
|
507
|
+
* You may obtain a copy of the License at
|
|
508
|
+
*
|
|
509
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
510
|
+
*
|
|
511
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
512
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
513
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
514
|
+
* See the License for the specific language governing permissions and
|
|
515
|
+
* limitations under the License.
|
|
516
|
+
*/
|
|
517
|
+
/**
|
|
518
|
+
* @license
|
|
519
|
+
* Copyright 2021 Google LLC
|
|
520
|
+
*
|
|
521
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
522
|
+
* you may not use this file except in compliance with the License.
|
|
523
|
+
* You may obtain a copy of the License at
|
|
524
|
+
*
|
|
525
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
526
|
+
*
|
|
527
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
528
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
529
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
530
|
+
* See the License for the specific language governing permissions and
|
|
531
|
+
* limitations under the License.
|
|
532
|
+
*/
|
|
533
|
+
/**
|
|
534
|
+
* @license
|
|
535
|
+
* Copyright 2021 Google LLC
|
|
536
|
+
*
|
|
537
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
538
|
+
* you may not use this file except in compliance with the License.
|
|
539
|
+
* You may obtain a copy of the License at
|
|
540
|
+
*
|
|
541
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
542
|
+
*
|
|
543
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
544
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
545
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
546
|
+
* See the License for the specific language governing permissions and
|
|
547
|
+
* limitations under the License.
|
|
548
|
+
*/
|
|
549
|
+
export { Hct, SchemeTonalSpot, argbFromHex, hexFromArgb };
|
package/lib/ux.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Context, h, Session } from 'koishi';
|
|
2
|
+
type Owner = {
|
|
3
|
+
name: string;
|
|
4
|
+
matches: (session: Session) => boolean | Promise<boolean>;
|
|
5
|
+
};
|
|
6
|
+
/** 图文模式默认只发渲染图;完整文字只在用户切到「文字」模式时出现。偏好只影响本人。 */
|
|
7
|
+
export declare function usePresentation(ctx: Context, command: string): {
|
|
8
|
+
textOnly: (session: Session) => boolean;
|
|
9
|
+
/** 图文模式只给图片;图片缺失或用户选了文字模式时才退回文字。 */
|
|
10
|
+
present(session: Session, image: h.Fragment | null | undefined, text: h.Fragment): h.Fragment;
|
|
11
|
+
};
|
|
12
|
+
/** Plugins register their active input grammar; overlapping messages are never executed. */
|
|
13
|
+
export declare function registerDirectInput(ctx: Context, name: string, matches: Owner['matches']): void;
|
|
14
|
+
export declare function directInputConflict(ctx: Context, session: Session): Promise<boolean>;
|
|
15
|
+
/** No hidden time limit: users can extend the non-game input step without losing context. */
|
|
16
|
+
export declare function promptInput(session: Session, instruction: string): Promise<string | undefined>;
|
|
17
|
+
export declare const IMAGE_FAILURE = "\u56FE\u7247\u6682\u65F6\u65E0\u6CD5\u751F\u6210\uFF0C\u5DF2\u4FDD\u7559\u6587\u5B57\u5185\u5BB9\u3002\u53EF\u4EE5\u7A0D\u540E\u91CD\u8BD5\uFF1B\u82E5\u6301\u7EED\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002";
|
|
18
|
+
/**
|
|
19
|
+
* 渲染图的等价文字。图文模式随图片一起丢掉、文字模式展开成正文,
|
|
20
|
+
* 因此它永远不会原样发到聊天平台。
|
|
21
|
+
*/
|
|
22
|
+
export declare const IMAGE_TEXT_TYPE = "ux-image-text";
|
|
23
|
+
export declare function imageText(text: h.Fragment): h;
|
|
24
|
+
/** 图文模式:保留图片与普通文字,去掉图片的等价文字。 */
|
|
25
|
+
export declare function imagesOnly(content: h.Fragment): h[];
|
|
26
|
+
/** 文字模式:去掉图片,把等价文字展开成普通文本。 */
|
|
27
|
+
export declare function withoutImages(content: h.Fragment): h[];
|
|
28
|
+
/** 发送前的统一选择:文字模式去掉图片,图文模式去掉等价文字。 */
|
|
29
|
+
export declare function choosePresentation(content: h.Fragment, textOnly: boolean): h[];
|
|
30
|
+
export declare function isTextOnly(ctx: Context, session: Session): boolean;
|
|
31
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-cchess",
|
|
3
|
-
"description": "Koishi
|
|
4
|
-
"version": "2.
|
|
3
|
+
"description": "Koishi 中国象棋:支持玩家对战、皮卡鱼引擎和 FEN 局面导入。",
|
|
4
|
+
"version": "2.4.1",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"lib",
|
|
9
9
|
"LICENSE-APACHE",
|
|
10
|
-
"LICENSE-MIT"
|
|
10
|
+
"LICENSE-MIT",
|
|
11
|
+
"DESIGN_SYSTEM.md",
|
|
12
|
+
"CHANGELOG.md",
|
|
13
|
+
"THIRD_PARTY_NOTICES.md"
|
|
11
14
|
],
|
|
12
15
|
"scripts": {
|
|
13
|
-
"yakumo:after:esbuild": "node scripts/copy-assets.mjs"
|
|
16
|
+
"yakumo:after:esbuild": "node scripts/copy-assets.mjs",
|
|
17
|
+
"check:design": "node scripts/check-design-system.mjs"
|
|
14
18
|
},
|
|
15
19
|
"koishi": {
|
|
16
20
|
"service": {
|