chore: fix spelling errors

This commit is contained in:
Raymond Hear 2025-03-28 14:33:53 -04:00
parent 0cd5a259ae
commit e3bdb9f5cd
40 changed files with 75 additions and 75 deletions

View file

@ -132,7 +132,7 @@ export const DEFAULT_ELEMENT_STROKE_COLOR_PALETTE = {
...COMMON_ELEMENT_SHADES,
} as const;
// ORDER matters for positioning in pallete (5x3 grid)s
// ORDER matters for positioning in palette (5x3 grid)s
export const DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE = {
transparent: COLOR_PALETTE.transparent,
white: COLOR_PALETTE.white,

View file

@ -62,7 +62,7 @@ export const POINTER_EVENTS = {
enabled: "all",
disabled: "none",
// asserted as any so it can be freely assigned to React Element
// "pointerEnvets" CSS prop
// "pointerEvents" CSS prop
inheritFromUI: "var(--ui-pointerEvents)" as any,
} as const;
@ -361,8 +361,8 @@ export const ROUNDNESS = {
PROPORTIONAL_RADIUS: 2,
// Current default algorithm for rectangles, using fixed pixel radius.
// It's working similarly to a regular border-radius, but attemps to make
// radius visually similar across differnt element sizes, especially
// It's working similarly to a regular border-radius, but attempts to make
// radius visually similar across different element sizes, especially
// very large and very small elements.
//
// NOTE right now we don't allow configuration and use a constant radius

View file

@ -92,7 +92,7 @@ export const hitElementItself = <Point extends GlobalPoint | LocalPoint>({
frameNameBound = null,
}: HitTestArgs<Point>) => {
let hit = shouldTestInside(element)
? // Since `inShape` tests STRICTLY againt the insides of a shape
? // Since `inShape` tests STRICTLY against the insides of a shape
// we would need `onShape` as well to include the "borders"
isPointInShape(pointFrom(x, y), shape) ||
isPointOnShape(pointFrom(x, y), shape, threshold)

View file

@ -47,7 +47,7 @@ export const distanceToBindableElement = (
*
* @param element The rectanguloid element
* @param p The point to consider
* @returns The eucledian distance to the outline of the rectanguloid element
* @returns The euclidean distance to the outline of the rectanguloid element
*/
const distanceToRectanguloidElement = (
element: ExcalidrawRectanguloidElement,
@ -78,7 +78,7 @@ const distanceToRectanguloidElement = (
*
* @param element The diamond element
* @param p The point to consider
* @returns The eucledian distance to the outline of the diamond
* @returns The euclidean distance to the outline of the diamond
*/
const distanceToDiamondElement = (
element: ExcalidrawDiamondElement,
@ -109,7 +109,7 @@ const distanceToDiamondElement = (
*
* @param element The ellipse element
* @param p The point to consider
* @returns The eucledian distance to the outline of the ellipse
* @returns The euclidean distance to the outline of the ellipse
*/
const distanceToEllipseElement = (
element: ExcalidrawEllipseElement,

View file

@ -56,7 +56,7 @@ const COMMON = {
/**
* Generally do not break, unless closed symbol is followed by an opening symbol.
*
* Also, western punctation is often used in modern Korean and expects to be treated
* Also, western punctuation is often used in modern Korean and expects to be treated
* similarly to the CJK opening and closing symbols.
*
* Hello() ["Hello", "(한", "글)"]

View file

@ -5,7 +5,7 @@
@include outlineButtonIconStyles;
& > * {
// dissalow pointer events on children, so we always have event.target on the button itself
// disallow pointer events on children, so we always have event.target on the button itself
pointer-events: none;
}
}

View file

@ -5,7 +5,7 @@ exports[`Test <App/> > should show error modal when using brave and measureText
data-testid="brave-measure-text-error"
>
<p>
Looks like you are using Brave browser with the
Looks like you are using Brave browser with the
<span
style="font-weight: 600;"
>
@ -14,7 +14,7 @@ exports[`Test <App/> > should show error modal when using brave and measureText
setting enabled.
</p>
<p>
This could result in breaking the
This could result in breaking the
<span
style="font-weight: 600;"
>
@ -23,22 +23,22 @@ exports[`Test <App/> > should show error modal when using brave and measureText
in your drawings.
</p>
<p>
We strongly recommend disabling this setting. You can follow
We strongly recommend disabling this setting. You can follow
<a
href="http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser"
href="http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggressive-block-fingerprinting-in-brave-browser"
>
these steps
</a>
on how to do so.
</p>
<p>
If disabling this setting doesn't fix the display of text elements, please open an
If disabling this setting doesn't fix the display of text elements, please open an
<a
href="https://github.com/excalidraw/excalidraw/issues/new"
>
issue
</a>
on our GitHub, or write us on
on our GitHub, or write us on
<a
href="https://discord.gg/UexuTaE"
>

View file

@ -20,7 +20,7 @@ export const withInternalFallback = <P,>(
// for rerenders
const [, setCounter] = useAtom(renderAtom);
// for initial & subsequent renders. Tracked as component state
// due to excalidraw multi-instance scanerios.
// due to excalidraw multi-instance scenarios.
const metaRef = useRef({
// flag set on initial render to tell the fallback component to skip the
// render until mount counter are initialized. This is because the counter

View file

@ -21,7 +21,7 @@ export interface ExportedDataState {
/**
* Map of legacy AppState keys, with values of:
* [<legacy type>, <new AppState proeprty>]
* [<legacy type>, <new AppState property>]
*
* This is a helper type used in downstream abstractions.
* Don't consume on its own.

View file

@ -37,7 +37,7 @@ const deburredLetters = {
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
// normaly Ae/ae
// normally Ae/ae
'\xc6': 'E', '\xe6': 'e',
// normally Th/th
'\xde': 'T', '\xfe': 't',

View file

@ -82,9 +82,9 @@ const truncateText = (element: ExcalidrawTextElement, maxWidth: number) => {
if (metrics.width > maxWidth) {
// we iterate from the right, removing characters one by one instead
// of bulding the string up. This assumes that it's more likely
// of building the string up. This assumes that it's more likely
// your frame names will overflow by not that many characters
// (if ever), so it sohuld be faster this way.
// (if ever), so it should be faster this way.
for (let i = text.length; i > 0; i--) {
const newText = `${text.slice(0, i)}...`;
if (ctx.measureText(newText).width <= maxWidth) {
@ -376,7 +376,7 @@ export const exportToSvg = async (
try {
encodeSvgBase64Payload({
metadataElement,
// when embedding scene, we want to embed the origionally supplied
// when embedding scene, we want to embed the originally supplied
// elements which don't contain the temp frame labels.
// But it also requires that the exportToSvg is being supplied with
// only the elements that we're exporting, and no extra.

View file

@ -50,7 +50,7 @@ export type SVGRenderConfig = {
embedsValidationStatus: EmbedsValidationStatus;
/**
* whether to attempt to reuse images as much as possible through symbols
* (reduces SVG size, but may be incompoatible with some SVG renderers)
* (reduces SVG size, but may be incompatible with some SVG renderers)
*
* @default true
*/

View file

@ -2,8 +2,8 @@
// @ts-nocheck
/**
* Slitghly modified emscripten bindings of https://github.com/kekee000/fonteditor-core/blob/582bba757aa2915ec2240c61717ff12c50594675/woff2src/woff2.js
*
* Slightly modified emscripten bindings of https://github.com/kekee000/fonteditor-core/blob/582bba757aa2915ec2240c61717ff12c50594675/woff2src/woff2.js
*
* CHANGELOG:
* - replaced existing exports with default esm export (`export default Module;`)
* - replaced "instanceof ArrayBuffer" with "Object.prototype.toString.call(d) === "[object ArrayBuffer]", due to unreliability of different ArrayBuffer instances depending on the context (i.e. inside VM)

View file

@ -5,7 +5,7 @@ exports[`Test <App/> > should show error modal when using brave and measureText
data-testid="brave-measure-text-error"
>
<p>
Looks like you are using Brave browser with the
Looks like you are using Brave browser with the
<span
style="font-weight: 600;"
>
@ -14,7 +14,7 @@ exports[`Test <App/> > should show error modal when using brave and measureText
setting enabled.
</p>
<p>
This could result in breaking the
This could result in breaking the
<span
style="font-weight: 600;"
>
@ -23,22 +23,22 @@ exports[`Test <App/> > should show error modal when using brave and measureText
in your drawings.
</p>
<p>
We strongly recommend disabling this setting. You can follow
We strongly recommend disabling this setting. You can follow
<a
href="http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser"
href="http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggressive-block-fingerprinting-in-brave-browser"
>
these steps
</a>
on how to do so.
</p>
<p>
If disabling this setting doesn't fix the display of text elements, please open an
If disabling this setting doesn't fix the display of text elements, please open an
<a
href="https://github.com/excalidraw/excalidraw/issues/new"
>
issue
</a>
on our GitHub, or write us on
on our GitHub, or write us on
<a
href="https://discord.gg/UexuTaE"
>

View file

@ -20,7 +20,7 @@ exports[`<Excalidraw/> > <MainMenu/> > should render main menu with host menu it
</button>
<a
class="dropdown-menu-item dropdown-menu-item-base"
href="blog.excalidaw.com"
href="blog.excalidraw.com"
rel="noreferrer"
target="_blank"
>

View file

@ -244,7 +244,7 @@ export type ObservedElementsAppState = {
editingGroupId: AppState["editingGroupId"];
selectedElementIds: AppState["selectedElementIds"];
selectedGroupIds: AppState["selectedGroupIds"];
// Avoiding storing whole instance, as it could lead into state incosistencies, empty undos/redos and etc.
// Avoiding storing whole instance, as it could lead into state inconsistencies, empty undos/redos and etc.
editingLinearElementId: LinearElementEditor["elementId"] | null;
// Right now it's coupled to `editingLinearElement`, ideally it should not be really needed as we already have selectedElementIds & editingLinearElementId
selectedLinearElementId: LinearElementEditor["elementId"] | null;

View file

@ -21,7 +21,7 @@ interface ImportMetaEnv {
VITE_APP_FIREBASE_CONFIG: string;
// whether to disable live reload / HMR. Usuaully what you want to do when
// whether to disable live reload / HMR. Usually what you want to do when
// debugging Service Workers.
VITE_APP_DEV_DISABLE_LIVE_RELOAD: string;
// To enable bounding box for text containers

View file

@ -67,7 +67,7 @@ export const ellipseIncludesPoint = <Point extends GlobalPoint | LocalPoint>(
* @param point The point to test
* @param ellipse The ellipse to compare against
* @param threshold The distance to consider a point close enough to be "on" the outline
* @returns TRUE if the point is on the ellise outline
* @returns TRUE if the point is on the ellipse outline
*/
export const ellipseTouchesPoint = <Point extends GlobalPoint | LocalPoint>(
point: Point,
@ -83,7 +83,7 @@ export const ellipseTouchesPoint = <Point extends GlobalPoint | LocalPoint>(
*
* @param p The point to consider
* @param ellipse The ellipse to calculate the distance to
* @returns The eucledian distance
* @returns The euclidean distance
*/
export const ellipseDistanceFromPoint = <
Point extends GlobalPoint | LocalPoint,
@ -137,7 +137,7 @@ export const ellipseDistanceFromPoint = <
};
/**
* Calculate a maximum of two intercept points for a line going throug an
* Calculate a maximum of two intercept points for a line going through an
* ellipse.
*/
export function ellipseSegmentInterceptPoints<

View file

@ -47,7 +47,7 @@ export const rangesOverlap = (
};
/**
* Given two ranges,return ther intersection of the two ranges if any e.g. the
* Given two ranges, return the intersection of the two ranges if any e.g. the
* intersection of [1, 3] and [2, 4] is [2, 3].
*
* @param param0 The first range to compare

View file

@ -1,7 +1,7 @@
import type { GlobalPoint, LocalPoint, Vector } from "./types";
/**
* Create a vector from the x and y coordiante elements.
* Create a vector from the x and y coordinate elements.
*
* @param x The X aspect of the vector
* @param y T Y aspect of the vector
@ -20,7 +20,7 @@ export function vector(
* Turn a point into a vector with the origin point.
*
* @param p The point to turn into a vector
* @param origin The origin point in a given coordiante system
* @param origin The origin point in a given coordinate system
* @returns The created vector from the point and the origin
*/
export function vectorFromPoint<Point extends GlobalPoint | LocalPoint>(
@ -36,7 +36,7 @@ export function vectorFromPoint<Point extends GlobalPoint | LocalPoint>(
*
* @param a One of the vectors to use for the directed area calculation
* @param b The other vector to use for the directed area calculation
* @returns The directed area value for the two vectos
* @returns The directed area value for the two vectors
*/
export function vectorCross(a: Vector, b: Vector): number {
return a[0] * b[1] - b[0] * a[1];
@ -108,7 +108,7 @@ export function vectorScale(v: Vector, scalar: number): Vector {
}
/**
* Calculates the sqare magnitude of a vector. Use this if you compare
* Calculates the square magnitude of a vector. Use this if you compare
* magnitudes as it saves you an SQRT.
*
* @param v The vector to measure
@ -129,7 +129,7 @@ export function vectorMagnitude(v: Vector) {
}
/**
* Normalize the vector (i.e. make the vector magnitue equal 1).
* Normalize the vector (i.e. make the vector magnitude equal 1).
*
* @param v The vector to normalize
* @returns The new normalized vector