mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 20:41:50 +08:00
refactor(editor): add gfx entry in bs global package (#10612)
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
"./env": "./src/env/index.ts",
|
||||
"./exceptions": "./src/exceptions/index.ts",
|
||||
"./di": "./src/di/index.ts",
|
||||
"./types": "./src/types/index.ts"
|
||||
"./types": "./src/types/index.ts",
|
||||
"./gfx": "./src/gfx/index.ts"
|
||||
},
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
@@ -30,6 +31,12 @@
|
||||
],
|
||||
"di": [
|
||||
"dist/di/index.d.ts"
|
||||
],
|
||||
"types": [
|
||||
"dist/types/index.d.ts"
|
||||
],
|
||||
"gfx": [
|
||||
"dist/gfx/index.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
+1
-3
@@ -1,5 +1,4 @@
|
||||
// control coords are not relative to start or end
|
||||
import { assertExists } from './assert.js';
|
||||
import { CURVETIME_EPSILON, isZero } from './math.js';
|
||||
import { Bound, type IVec, PointLocation, Vec } from './model/index.js';
|
||||
|
||||
@@ -111,7 +110,7 @@ export function getBezierNearestTime(
|
||||
function refine(t: number) {
|
||||
if (t >= 0 && t <= 1) {
|
||||
const tmpPoint = getBezierPoint(values, t);
|
||||
assertExists(tmpPoint);
|
||||
if (!tmpPoint) return false;
|
||||
const dist = Vec.dist2(point, tmpPoint);
|
||||
if (dist < minDist) {
|
||||
minDist = dist;
|
||||
@@ -137,7 +136,6 @@ export function getBezierNearestPoint(
|
||||
) {
|
||||
const t = getBezierNearestTime(values, point);
|
||||
const pointOnCurve = getBezierPoint(values, t);
|
||||
assertExists(pointOnCurve);
|
||||
return pointOnCurve;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
export * from './bound.js';
|
||||
export * from './curve.js';
|
||||
export * from './math.js';
|
||||
export * from './model/index.js';
|
||||
export * from './perfect-freehand/index.js';
|
||||
export * from './polyline.js';
|
||||
export * from './xywh.js';
|
||||
@@ -1,18 +1,10 @@
|
||||
export * from './assert.js';
|
||||
export * from './bound.js';
|
||||
export * from './crypto.js';
|
||||
export * from './curve.js';
|
||||
export * from './disposable.js';
|
||||
export * from './function.js';
|
||||
export * from './iterable.js';
|
||||
export * from './logger.js';
|
||||
export * from './math.js';
|
||||
export * from './model/index.js';
|
||||
export * from './perfect-freehand/index.js';
|
||||
export * from './polyline.js';
|
||||
export * from './signal-watcher.js';
|
||||
export * from './slot.js';
|
||||
export * from './types.js';
|
||||
export * from './with-disposable.js';
|
||||
export type { SerializedXYWH, XYWH } from './xywh.js';
|
||||
export { deserializeXYWH, serializeXYWH } from './xywh.js';
|
||||
|
||||
Reference in New Issue
Block a user