gigaboard 1.4.0 → 1.4.2
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/{chunk-BNJKX6K7.js → chunk-SO6AOEFF.js} +3 -3
- package/dist/chunk-SO6AOEFF.js.map +1 -0
- package/dist/{chunk-K7D2C72S.cjs → chunk-UBD62NOI.cjs} +3 -3
- package/dist/chunk-UBD62NOI.cjs.map +1 -0
- package/dist/core.cjs +44 -44
- package/dist/core.js +1 -1
- package/dist/index.cjs +53 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BNJKX6K7.js.map +0 -1
- package/dist/chunk-K7D2C72S.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PieceType, Color, createDragController, createGigachessAdapter, createBoardModel, isEmptyCell, pieceTypeOf, colorOf, encodeBoardCell, decodePackedMove } from './chunk-
|
|
2
|
-
export { Color, PieceType, createBoardModel, createGigachessAdapter, packMove, preloadGigachessAdapter, unpackMove } from './chunk-
|
|
1
|
+
import { PieceType, Color, createDragController, createGigachessAdapter, createBoardModel, isEmptyCell, pieceTypeOf, colorOf, encodeBoardCell, decodePackedMove } from './chunk-SO6AOEFF.js';
|
|
2
|
+
export { Color, PieceType, createBoardModel, createGigachessAdapter, packMove, preloadGigachessAdapter, unpackMove } from './chunk-SO6AOEFF.js';
|
|
3
3
|
import { CSS_VARS, defaultTheme, defaultPieces, parseFenPlacement, defaultArrowColors, DEFAULT_ILLEGAL_FLASH_TINT, DEFAULT_PREMOVE_TINT } from './chunk-EJUGH25P.js';
|
|
4
4
|
export { CSS_VARS, DEFAULT_ILLEGAL_FLASH_TINT, DEFAULT_PREMOVE_TINT, defaultArrowColors, defaultPieces, defaultTheme } from './chunk-EJUGH25P.js';
|
|
5
5
|
import './chunk-OQLY5GJF.js';
|
|
@@ -160,11 +160,12 @@ function computeDynamicAeroGeometry(text, style, fontSize, isTerminal = true) {
|
|
|
160
160
|
const resolvedStyle = style ?? "aero_chisel";
|
|
161
161
|
const hasText = Boolean(text && text.trim().length > 0);
|
|
162
162
|
if (!hasText) {
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
const
|
|
163
|
+
const scale2 = Math.max(1, fontSize / 2.45);
|
|
164
|
+
const tipX = 2.8 * scale2;
|
|
165
|
+
const shoulderX = 0.2 * scale2;
|
|
166
|
+
const rearX = -1.2 * scale2;
|
|
167
|
+
const dockX2 = -1.8 * scale2;
|
|
168
|
+
const halfH2 = 2.2 * scale2;
|
|
168
169
|
const path2 = `M ${rearX},${-halfH2} L ${shoulderX},${-halfH2} L ${tipX},0 L ${shoulderX},${halfH2} L ${rearX},${halfH2} C ${dockX2},${halfH2} ${dockX2},${-halfH2} ${rearX},${-halfH2} Z`;
|
|
169
170
|
return {
|
|
170
171
|
path: path2,
|
|
@@ -177,16 +178,17 @@ function computeDynamicAeroGeometry(text, style, fontSize, isTerminal = true) {
|
|
|
177
178
|
const charWidth = fontSize * 0.6;
|
|
178
179
|
const textWidth = text.length * charWidth;
|
|
179
180
|
const halfTextW = textWidth / 2;
|
|
180
|
-
const
|
|
181
|
-
const
|
|
181
|
+
const scale = Math.max(1, fontSize / 2.45);
|
|
182
|
+
const padX = 0.75 * scale;
|
|
183
|
+
const cabinW = Math.max(3.2 * scale, halfTextW + padX);
|
|
182
184
|
const halfH = Math.max(2.3, fontSize * 0.9);
|
|
183
|
-
const rearInset = 0.65;
|
|
185
|
+
const rearInset = 0.65 * scale;
|
|
184
186
|
const dockX = -cabinW - rearInset;
|
|
185
187
|
let frontLen = 0;
|
|
186
188
|
let path = "";
|
|
187
189
|
if (resolvedStyle === "aero_chisel") {
|
|
188
190
|
if (isTerminal) {
|
|
189
|
-
const noseLead = 1.25;
|
|
191
|
+
const noseLead = 1.25 * scale;
|
|
190
192
|
const tipX = cabinW + noseLead;
|
|
191
193
|
frontLen = tipX;
|
|
192
194
|
path = `M ${-cabinW},${-halfH} L ${cabinW},${-halfH} L ${tipX},0 L ${cabinW},${halfH} L ${-cabinW},${halfH} C ${dockX},${halfH} ${dockX},${-halfH} ${-cabinW},${-halfH} Z`;
|