@zsviczian/excalidraw 0.16.1-obsidian-5 → 0.16.1-obsidian-6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zsviczian/excalidraw",
3
- "version": "0.16.1-obsidian-5",
3
+ "version": "0.16.1-obsidian-6",
4
4
  "main": "main.js",
5
5
  "types": "types/packages/excalidraw/index.d.ts",
6
6
  "files": [
@@ -1,7 +1,7 @@
1
- import { AppState } from "../../src/types";
1
+ import { AppState, Primitive } from "../../src/types";
2
2
  import { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
3
3
  export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
4
- export declare const getFormValue: <T>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, defaultValue: T) => T;
4
+ export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
5
5
  export declare const actionChangeStrokeColor: {
6
6
  name: "changeStrokeColor";
7
7
  trackEvent: false;
@@ -222,6 +222,11 @@ export declare const ROUGHNESS: {
222
222
  readonly artist: 1;
223
223
  readonly cartoonist: 2;
224
224
  };
225
+ export declare const STROKE_WIDTH: {
226
+ readonly thin: 1;
227
+ readonly bold: 2;
228
+ readonly extraBold: 4;
229
+ };
225
230
  export declare const DEFAULT_ELEMENT_PROPS: {
226
231
  strokeColor: ExcalidrawElement["strokeColor"];
227
232
  backgroundColor: ExcalidrawElement["backgroundColor"];
package/types/frame.d.ts CHANGED
@@ -17,13 +17,10 @@ export declare const groupsAreCompletelyOutOfFrame: (elements: readonly NonDelet
17
17
  * Returns a map of frameId to frame elements. Includes empty frames.
18
18
  */
19
19
  export declare const groupByFrames: (elements: readonly ExcalidrawElement[]) => Map<string, ExcalidrawElement[]>;
20
- export declare const getFrameElements: (allElements: ExcalidrawElementsIncludingDeleted, frameId: string, opts?: {
21
- includeBoundArrows?: boolean;
22
- }) => ExcalidrawElement[];
20
+ export declare const getFrameElements: (allElements: ExcalidrawElementsIncludingDeleted, frameId: string) => ExcalidrawElement[];
23
21
  export declare const getElementsInResizingFrame: (allElements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameElement, appState: AppState) => ExcalidrawElement[];
24
22
  export declare const getElementsInNewFrame: (allElements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameElement) => ExcalidrawElement[];
25
23
  export declare const getContainingFrame: (element: ExcalidrawElement, elementsMap?: Map<string, ExcalidrawElement>) => ExcalidrawFrameElement | null;
26
- export declare const isValidFrameChild: (element: ExcalidrawElement) => boolean;
27
24
  /**
28
25
  * Retains (or repairs for target frame) the ordering invriant where children
29
26
  * elements come right before the parent frame:
@@ -4,7 +4,6 @@ export declare const hasStrokeColor: (type: string) => boolean;
4
4
  export declare const hasStrokeWidth: (type: string) => boolean;
5
5
  export declare const hasStrokeStyle: (type: string) => boolean;
6
6
  export declare const canChangeRoundness: (type: string) => boolean;
7
- export declare const hasText: (type: string) => boolean;
8
7
  export declare const canHaveArrowheads: (type: string) => boolean;
9
8
  export declare const getElementAtPosition: (elements: readonly NonDeletedExcalidrawElement[], isAtPositionFn: (element: NonDeletedExcalidrawElement) => boolean) => NonDeletedExcalidrawElement | null;
10
9
  export declare const getElementsAtPosition: (elements: readonly NonDeletedExcalidrawElement[], isAtPositionFn: (element: NonDeletedExcalidrawElement) => boolean) => NonDeletedExcalidrawElement[];
@@ -1,5 +1,5 @@
1
1
  export { isOverScrollBars } from "./scrollbars";
2
2
  export { isSomeElementSelected, getElementsWithinSelection, getCommonAttributeOfSelectedElements, getSelectedElements, getTargetElements, } from "./selection";
3
3
  export { calculateScrollCenter } from "./scroll";
4
- export { hasBackground, hasStrokeWidth, hasStrokeStyle, canHaveArrowheads, canChangeRoundness, getElementAtPosition, hasText, getElementsAtPosition, } from "./comparisons";
4
+ export { hasBackground, hasStrokeWidth, hasStrokeStyle, canHaveArrowheads, canChangeRoundness, getElementAtPosition, getElementsAtPosition, } from "./comparisons";
5
5
  export { getNormalizedZoom } from "./zoom";
package/types/types.d.ts CHANGED
@@ -569,4 +569,5 @@ export type KeyboardModifiersObject = {
569
569
  altKey: boolean;
570
570
  metaKey: boolean;
571
571
  };
572
+ export type Primitive = number | string | boolean | bigint | symbol | null | undefined;
572
573
  export {};