@scrawl-board/board 0.1.0-beta.1 → 0.1.0-beta.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/browser.d.ts +25 -14
- package/dist/browser.js +135 -93
- package/dist/core.js +19 -19
- package/dist/index.d.ts +63 -14
- package/dist/index.js +175 -106
- package/dist/react.d.ts +63 -14
- package/dist/react.js +174 -105
- package/package.json +1 -1
package/dist/browser.d.ts
CHANGED
|
@@ -689,6 +689,27 @@ interface BoardView {
|
|
|
689
689
|
y: number;
|
|
690
690
|
zoom: number;
|
|
691
691
|
}
|
|
692
|
+
/**
|
|
693
|
+
* The rendered board surface's color, reference grid, and shape stroke
|
|
694
|
+
* width — the subset of {@link ScrawlTheme} that reaches the rendering
|
|
695
|
+
* engine directly (everything else is UI-chrome-only, applied as CSS). Any
|
|
696
|
+
* field left unset keeps its current value.
|
|
697
|
+
*/
|
|
698
|
+
interface BoardThemeOptions {
|
|
699
|
+
/** The board/canvas background color — distinct from UI chrome panels. */
|
|
700
|
+
surface?: string;
|
|
701
|
+
/** `"flat"` (default): a plain, uniform board surface. `"textured"`: a subtle "melamine" micro-noise + satin sheen, like a physical whiteboard. */
|
|
702
|
+
surfaceTexture?: "flat" | "textured";
|
|
703
|
+
/** `"none"` (default) keeps the board a plain surface; `"line"`/`"dot"` draw a zoom-adaptive reference grid. */
|
|
704
|
+
gridMode?: "none" | "line" | "dot";
|
|
705
|
+
gridColor?: string;
|
|
706
|
+
/** Grid spacing in board units at 100% zoom. Ignored when `gridMode` is `"none"`. */
|
|
707
|
+
gridSpacing?: number;
|
|
708
|
+
/** On-screen grid line/dot width in CSS pixels — stays this width at any zoom, since the grid is a reference aid, not content. */
|
|
709
|
+
gridLineWidth?: number;
|
|
710
|
+
/** Shape (rectangle, ellipse, arrow, ...) border width, in board units — scales with zoom like ink, since it's part of the drawn content. */
|
|
711
|
+
shapeStrokeWidth?: number;
|
|
712
|
+
}
|
|
692
713
|
/**
|
|
693
714
|
* A Host-owned comment, summarized for Board-side search and marker
|
|
694
715
|
* rendering. Comments are not Document content — they carry no undo
|
|
@@ -899,12 +920,7 @@ interface CreateBoardControllerOptions {
|
|
|
899
920
|
* changes via `boardTheme.set` below — a headless/browser-tier Host that
|
|
900
921
|
* doesn't use the React theme system can set this directly instead.
|
|
901
922
|
*/
|
|
902
|
-
boardTheme?:
|
|
903
|
-
surface?: string;
|
|
904
|
-
gridMode?: "none" | "line" | "dot";
|
|
905
|
-
gridColor?: string;
|
|
906
|
-
gridSpacing?: number;
|
|
907
|
-
};
|
|
923
|
+
boardTheme?: BoardThemeOptions;
|
|
908
924
|
}
|
|
909
925
|
interface BoardController {
|
|
910
926
|
readonly document: ReadonlyBoardDocument;
|
|
@@ -931,13 +947,8 @@ interface BoardController {
|
|
|
931
947
|
redo(): void;
|
|
932
948
|
};
|
|
933
949
|
readonly boardTheme: {
|
|
934
|
-
/** Live update of the board surface color/grid — the controller's identity stays fixed across theme changes. */
|
|
935
|
-
set(theme:
|
|
936
|
-
surface?: string;
|
|
937
|
-
gridMode?: "none" | "line" | "dot";
|
|
938
|
-
gridColor?: string;
|
|
939
|
-
gridSpacing?: number;
|
|
940
|
-
}): void;
|
|
950
|
+
/** Live update of the board surface color/grid/shape-stroke-width — the controller's identity stays fixed across theme changes. */
|
|
951
|
+
set(theme: BoardThemeOptions): void;
|
|
941
952
|
};
|
|
942
953
|
readonly view: {
|
|
943
954
|
fit(): void;
|
|
@@ -1040,4 +1051,4 @@ type LocalBoard = {
|
|
|
1040
1051
|
declare function createLocalBoard(options: LocalBoardOptions): LocalBoard;
|
|
1041
1052
|
|
|
1042
1053
|
export { AssetResolutionError, STAMPS, SUPPORTED_ASSET_MEDIA_TYPES, assetRef, clampAssetCacheBytes, cloneCustomObject, createBoardController, createLocalBoard, isAssetRef, isStampKind, stampDataUrl };
|
|
1043
|
-
export type { ApplyOpsResult, AssetDiagnostic, AssetIngestRequest, AssetIngestResult, AssetIngestor, AssetKind, AssetPurpose, AssetRef, AssetResolutionErrorCode, AssetResolveRequest, AssetResolveResult, AssetResolver, BoardController, BoardControllerError, BoardEventMap, BoardKeyInput, BoardObject, BoardObjectInput, BoardObjectPatch, BoardPointerInput, BoardScene, BoardSnapshot, BoardStyle, BoardView, BuiltInTool, CollaborationAdapter, CollaborationReceiver, CollaborationSession, CollaborationSnapshot, CollaboratorIdentity, CommentMarker, ControllerOp, CreateBoardControllerOptions, CustomBoardObject, CustomObjectAddInput, CustomObjectDefinition, CustomTool, CustomToolDefinition, DeepReadonly, DocumentContext, ExtensionCommand, ExtensionDiagnostic, ExtensionHitResult, ExtensionId, ExtensionRequirement, InputModifiers, JsonObject, JsonValue, LoadResult, LocalBoard, LocalBoardOptions, LocalBoardSnapshot, Mat2x3, ObjectDescribeContext, ObjectIntent, ObjectType, PersistenceAdapter, PersistenceDiagnostic, PersistenceSnapshot, PresenceCursor, PresenceUser, PresenceView, QueryableBoardObject, ReadonlyBoardDocument, ReadonlyCustomObject, ReadonlyDocumentChange, SceneEllipse, SceneGroup, SceneImage, ScenePath, SceneRect, SceneText, ScrawlExtension, ScreenPoint, ScreenRect, StampKind, SupportedAssetMediaType, ToolCancelReason, ToolCapabilities, ToolCursor, ToolId };
|
|
1054
|
+
export type { ApplyOpsResult, AssetDiagnostic, AssetIngestRequest, AssetIngestResult, AssetIngestor, AssetKind, AssetPurpose, AssetRef, AssetResolutionErrorCode, AssetResolveRequest, AssetResolveResult, AssetResolver, BoardController, BoardControllerError, BoardEventMap, BoardKeyInput, BoardObject, BoardObjectInput, BoardObjectPatch, BoardPointerInput, BoardScene, BoardSnapshot, BoardStyle, BoardThemeOptions, BoardView, BuiltInTool, CollaborationAdapter, CollaborationReceiver, CollaborationSession, CollaborationSnapshot, CollaboratorIdentity, CommentMarker, ControllerOp, CreateBoardControllerOptions, CustomBoardObject, CustomObjectAddInput, CustomObjectDefinition, CustomTool, CustomToolDefinition, DeepReadonly, DocumentContext, ExtensionCommand, ExtensionDiagnostic, ExtensionHitResult, ExtensionId, ExtensionRequirement, InputModifiers, JsonObject, JsonValue, LoadResult, LocalBoard, LocalBoardOptions, LocalBoardSnapshot, Mat2x3, ObjectDescribeContext, ObjectIntent, ObjectType, PersistenceAdapter, PersistenceDiagnostic, PersistenceSnapshot, PresenceCursor, PresenceUser, PresenceView, QueryableBoardObject, ReadonlyBoardDocument, ReadonlyCustomObject, ReadonlyDocumentChange, SceneEllipse, SceneGroup, SceneImage, ScenePath, SceneRect, SceneText, ScrawlExtension, ScreenPoint, ScreenRect, StampKind, SupportedAssetMediaType, ToolCancelReason, ToolCapabilities, ToolCursor, ToolId };
|