@kubohiroya/turbowarp-plus-editor-code-views 0.2.0 → 0.2.1

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.
@@ -9,12 +9,12 @@ type Pane = {
9
9
  type Bridge = NonNullable<ReturnType<typeof getCodeSession>['bridge']>;
10
10
  type Presentation = NonNullable<ReturnType<Bridge['capturePane']>>;
11
11
  /** The code area of a tab as a saved workspace keeps it: zoom, scroll position and script view. */
12
- export interface SavedCodePane {
12
+ export type SavedCodePane = {
13
13
  scale: number;
14
14
  x: number;
15
15
  y: number;
16
16
  scriptView?: ScriptView;
17
- }
17
+ };
18
18
  /** Read a saved code area back, or nothing if it does not have the shape `serialize` writes. */
19
19
  export declare function readSavedCodePane(value: Record<string, unknown>): SavedCodePane | undefined;
20
20
  export declare function createCodePaneAdapter(vm: any, locale: string, attachMinimap?: AttachPreviewMinimap): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubohiroya/turbowarp-plus-editor-code-views",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Code views for TurboWarp Plus Editor: code in tabs and windows, the detached block palette, script layout and block field editing",
5
5
  "type": "module",
6
6
  "license": "MPL-2.0",
package/src/code-pane.ts CHANGED
@@ -7,12 +7,13 @@ type Bridge = NonNullable<ReturnType<typeof getCodeSession>['bridge']>;
7
7
  type Presentation = NonNullable<ReturnType<Bridge['capturePane']>>;
8
8
 
9
9
  /** The code area of a tab as a saved workspace keeps it: zoom, scroll position and script view. */
10
- export interface SavedCodePane {
10
+ // A type alias, not an interface, so it fits the workbench's `Record<string, unknown>` for a serialized pane.
11
+ export type SavedCodePane = {
11
12
  scale: number;
12
13
  x: number;
13
14
  y: number;
14
15
  scriptView?: ScriptView;
15
- }
16
+ };
16
17
 
17
18
  const scriptViews: readonly ScriptView[] = ['free', 'z', 'n'];
18
19
  const finite = (value: unknown, limit: number): value is number =>